Frame 1
function cargando() {
var _local2;
var _local3;
var _local4;
_local2 = _root.getBytesTotal();
_local3 = _root.getBytesLoaded();
_local4 = Math.floor((_local3 * 100) / _local2);
porcentaje_txt.text = _local4 + " %";
barra_mc.gotoAndStop(_local4);
if (_local3 == _local2) {
clearInterval(hiloPrecarga);
gotoAndPlay (99);
}
}
_root.completer = 0;
stop();
Frame 2
stop();
Frame 51
gotoAndPlay (99);
Frame 99
function split_map() {
_root.numplataformas = mapa.length;
mapainfo = mapa[0].split(":");
i = 1;
_root.mundo["plataforma2" + i]._width = mapainfo[0];
_root.mundo["plataforma2" + i]._height = mapainfo[1];
_root.mundo["plataforma2" + i]._x = mapainfo[2];
_root.mundo["plataforma2" + i]._y = mapainfo[3];
_root.profundidad = _root.profundidad + 1;
i = 2;
while (i <= numplataformas) {
_root.profundidad = _root.profundidad + 1;
mapainfo[3] = 0;
mapainfo = mapa[i - 1].split(":");
if (mapainfo[4] == 1) {
_root.mundo.c1urvao.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 2) {
_root.mundo.c2urvao.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 3) {
_root.mundo.c3urvao.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 4) {
_root.mundo.c4urvao.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 5) {
_root.mundo.c5urvao.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 6) {
_root.mundo.c6urvao.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 7) {
_root.decoracion.c7urvao.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 8) {
_root.mundo.curvaoloop1.duplicateMovieClip("plataforma2" + i, _root.profundidad + 30000);
} else if (mapainfo[4] == 10) {
_root.mundo.muevete1.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
_root.mundo["plataforma2" + i].maximo = mapainfo[5];
_root.mundo["plataforma2" + i].n = mapainfo[6];
} else if (mapainfo[4] == 11) {
_root.mundo.invisible1.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 12) {
_root.mundo.curvao1.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 13) {
_root.mundo.curvao12.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 14) {
_root.mundo.curvao11.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 15) {
_root.decoracion.fuente.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.mundo["decoracion" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.mundo["decoracion" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 16) {
_root.decoracion.nube1.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 17) {
_root.decoracion.nube2.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 18) {
_root.decoracion.nube3.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 19) {
_root.decoracion.nube4.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 20) {
_root.decoracion.barrasinpremio.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 21) {
_root.decoracion.barraconprmeio.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 22) {
_root.decoracion.columnacurvao.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 23) {
_root.decoracion.luzecilla.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 15000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 24) {
_root.mundo.playa1.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 25) {
_root.mundo.playa2.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 26) {
_root.mundo.playa3.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 27) {
_root.mundo.playa4.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 28) {
_root.mundo.playa5.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 29) {
_root.mundo.playa6.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 30) {
_root.mundo.playa7.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 31) {
_root.mundo.playa8.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 32) {
_root.mundo.playa9.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 33) {
_root.mundo.playa10.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 34) {
_root.mundo.playa11.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 35) {
_root.mundo.playa12.duplicateMovieClip("plataforma2" + i, _root.profundidad + 15000);
} else if (mapainfo[4] == 36) {
_root.decoracion.playa13.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 12000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 37) {
_root.decoracion.playa14.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 12000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 38) {
_root.decoracion.playa15.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 12000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 39) {
_root.decoracion.playa16.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 12000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 40) {
_root.decoracion.playa17.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 12000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 41) {
_root.decoracion.playa18.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 12000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 42) {
_root.decoracion.playa19.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 12000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 43) {
_root.decoracion.playa20.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 12000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
} else if (mapainfo[4] == 44) {
_root.decoracion.playa21.duplicateMovieClip("platafddorema2" + i, _root.profundidad + 12000);
_root.decoracion["platafddorema2" + i]._width = mapainfo[0];
_root.decoracion["platafddorema2" + i]._height = mapainfo[1];
_root.decoracion["platafddorema2" + i]._x = mapainfo[2] - (_root.decoracion["platafddorema2" + i]._width / 2);
_root.decoracion["platafddorema2" + i]._y = mapainfo[3] - (_root.decoracion["platafddorema2" + i]._height / 2);
_root.decoracion["platafddorema2" + i].numero = i - 1;
}
_root.mundo["plataforma2" + i]._width = mapainfo[0];
_root.mundo["plataforma2" + i]._height = mapainfo[1];
_root.mundo["plataforma2" + i]._x = mapainfo[2] - (_root.mundo["plataforma2" + i]._width / 2);
_root.mundo["plataforma2" + i]._y = mapainfo[3] - (_root.mundo["plataforma2" + i]._height / 2);
_root.mundo["plataforma2" + i].numero = i - 1;
i++;
}
_root.decoracion.final1.duplicateMovieClip("final2", _root.profundidad + 17500);
i = 1;
final = final.split(":");
_root.decoracion.final2._x = final[0];
_root.decoracion.final2._y = (421 - _root.decoracion.final1._height) - final[1];
_root.numgusanos = gusanos.length;
if (_root.numgusanos == 0) {
_root.decoracion.gusano1.swapDepths(1);
_root.decoracion.gusano1.removeMovieClip();
} else if (_root.numgusanos == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = gusanos[i - 1].split(":");
_root.decoracion["gusano" + i]._x = mapainfo[0];
_root.decoracion["gusano" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = gusanos[i - 1].split(":");
_root.decoracion["gusano" + i]._x = mapainfo[0];
_root.decoracion["gusano" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numgusanos) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.gusano1.duplicateMovieClip("gusano" + i, _root.profundidad);
mapainfo = gusanos[i - 1].split(":");
_root.decoracion["gusano" + i]._x = mapainfo[0];
_root.decoracion["gusano" + i]._y = mapainfo[1];
i++;
}
}
_root.nummonedas = monedas.length;
if (_root.nummonedas == 0) {
_root.decoracion.moneda1.swapDepths(1);
_root.decoracion.moneda1.removeMovieClip();
} else if (_root.nummonedas == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = monedas[i - 1].split(":");
_root.decoracion["moneda" + i]._x = mapainfo[0];
_root.decoracion["moneda" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = monedas[i - 1].split(":");
_root.decoracion["moneda" + i]._x = mapainfo[0];
_root.decoracion["moneda" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.nummonedas) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.moneda1.duplicateMovieClip("moneda" + i, _root.profundidad);
mapainfo = monedas[i - 1].split(":");
_root.decoracion["moneda" + i]._x = mapainfo[0];
_root.decoracion["moneda" + i]._y = mapainfo[1];
i++;
}
}
_root.nummagnetos = magnetos.length;
if (_root.nummagnetos == 0) {
_root.decoracion.magneto1.swapDepths(1);
_root.decoracion.magneto1.removeMovieClip();
} else if (_root.nummagnetos == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = magnetos[i - 1].split(":");
_root.decoracion["magneto" + i]._x = mapainfo[0];
_root.decoracion["magneto" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = magnetos[i - 1].split(":");
_root.decoracion["magneto" + i]._x = mapainfo[0];
_root.decoracion["magneto" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.nummagnetos) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.magneto1.duplicateMovieClip("magneto" + i, _root.profundidad + 18000);
mapainfo = magnetos[i - 1].split(":");
_root.decoracion["magneto" + i]._x = mapainfo[0];
_root.decoracion["magneto" + i]._y = mapainfo[1];
i++;
}
}
_root.numeneflors = eneflors.length;
if (_root.numeneflors == 0) {
eneflor1.swapDepths(1);
eneflor1.removeMovieClip();
} else if (_root.numeneflors == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = eneflors[i - 1].split(":");
_root.decoracion["eneflor" + i]._x = mapainfo[0];
_root.decoracion["eneflor" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = eneflors[i - 1].split(":");
_root.decoracion["eneflor" + i]._x = mapainfo[0];
_root.decoracion["eneflor" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numeneflors) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.eneflor1.duplicateMovieClip("eneflor" + i, _root.profundidad + 18000);
mapainfo = eneflors[i - 1].split(":");
_root.decoracion["eneflor" + i]._x = mapainfo[0];
_root.decoracion["eneflor" + i]._y = mapainfo[1];
i++;
}
}
_root.numenefloras = enefloras.length;
if (_root.numenefloras == 0) {
eneflora1.swapDepths(1);
eneflora1.removeMovieClip();
} else if (_root.numenefloras == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = enefloras[i - 1].split(":");
_root.decoracion["eneflora" + i]._x = mapainfo[0];
_root.decoracion["eneflora" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = enefloras[i - 1].split(":");
_root.decoracion["eneflora" + i]._x = mapainfo[0];
_root.decoracion["eneflora" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numenefloras) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.eneflora1.duplicateMovieClip("eneflora" + i, _root.profundidad + 18000);
mapainfo = enefloras[i - 1].split(":");
_root.decoracion["eneflora" + i]._x = mapainfo[0];
_root.decoracion["eneflora" + i]._y = mapainfo[1];
i++;
}
}
_root.numpendulos = pendulos.length;
if (_root.numpendulos == 0) {
pendulo1.swapDepths(1);
pendulo1.removeMovieClip();
} else if (_root.numpendulos == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = pendulos[i - 1].split(":");
_root.decoracion["pendulo" + i]._x = mapainfo[0];
_root.decoracion["pendulo" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = pendulos[i - 1].split(":");
_root.decoracion["pendulo" + i]._x = mapainfo[0];
_root.decoracion["pendulo" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numpendulos) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.pendulo1.duplicateMovieClip("pendulo" + i, _root.profundidad + 18000);
mapainfo = pendulos[i - 1].split(":");
_root.decoracion["pendulo" + i]._x = mapainfo[0];
_root.decoracion["pendulo" + i]._y = mapainfo[1];
i++;
}
}
_root.nummuelles = muelles.length;
if (_root.nummuelles == 0) {
muelle1.swapDepths(1);
muelle1.removeMovieClip();
} else if (_root.nummuelles == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = muelles[i - 1].split(":");
_root.decoracion["muelle" + i]._x = mapainfo[0];
_root.decoracion["muelle" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = muelles[i - 1].split(":");
_root.decoracion["muelle" + i]._x = mapainfo[0];
_root.decoracion["muelle" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.nummuelles) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.muelle1.duplicateMovieClip("muelle" + i, _root.profundidad);
mapainfo = muelles[i - 1].split(":");
_root.decoracion["muelle" + i]._x = mapainfo[0];
_root.decoracion["muelle" + i]._y = -mapainfo[1];
i++;
}
}
_root.numtotems = totems.length;
if (_root.numtotems == 0) {
totem1.swapDepths(1);
totem1.removeMovieClip();
} else if (_root.numtotems == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = totems[i - 1].split(":");
_root.decoracion["totem" + i]._x = mapainfo[0];
_root.decoracion["totem" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = totems[i - 1].split(":");
_root.decoracion["totem" + i]._x = mapainfo[0];
_root.decoracion["totem" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numtotems) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.totem1.duplicateMovieClip("totem" + i, _root.profundidad);
mapainfo = totems[i - 1].split(":");
_root.decoracion["totem" + i]._x = mapainfo[0];
_root.decoracion["totem" + i]._y = mapainfo[1];
i++;
}
}
_root.numflors = flors.length;
if (_root.numflors == 0) {
flor1.swapDepths(1);
flor1.removeMovieClip();
} else if (_root.numflors == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = flors[i - 1].split(":");
_root.decoracion["flor" + i]._x = mapainfo[0];
_root.decoracion["flor" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = flors[i - 1].split(":");
_root.decoracion["flor" + i]._x = mapainfo[0];
_root.decoracion["flor" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numflors) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.flor1.duplicateMovieClip("flor" + i, _root.profundidad);
mapainfo = flors[i - 1].split(":");
_root.decoracion["flor" + i]._x = mapainfo[0];
_root.decoracion["flor" + i]._y = mapainfo[1];
i++;
}
}
_root.numgordos = gordos.length;
if (_root.numgordos == 0) {
gordo1.swapDepths(1);
gordo1.removeMovieClip();
} else if (_root.numgordos == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = gordos[i - 1].split(":");
_root.decoracion["gordo" + i]._x = mapainfo[0];
_root.decoracion["gordo" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = gordos[i - 1].split(":");
_root.decoracion["gordo" + i]._x = mapainfo[0];
_root.decoracion["gordo" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numgordos) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.gordo1.duplicateMovieClip("gordo" + i, _root.profundidad);
mapainfo = gordos[i - 1].split(":");
_root.decoracion["gordo" + i]._x = mapainfo[0];
_root.decoracion["gordo" + i]._y = mapainfo[1];
i++;
}
}
_root.numarbols = arbols.length;
if (_root.numarbols == 0) {
arbol1.swapDepths(1);
arbol1.removeMovieClip();
} else if (_root.numarbols == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = arbols[i - 1].split(":");
_root.decoracion["arbol" + i]._x = mapainfo[0];
_root.decoracion["arbol" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = arbols[i - 1].split(":");
_root.decoracion["arbol" + i]._x = mapainfo[0];
_root.decoracion["arbol" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numarbols) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.arbol1.duplicateMovieClip("arbol" + i, _root.profundidad);
mapainfo = arbols[i - 1].split(":");
_root.decoracion["arbol" + i]._x = mapainfo[0];
_root.decoracion["arbol" + i]._y = mapainfo[1];
i++;
}
}
_root.numarbolillos = arbolillos.length;
if (_root.numarbolillos == 0) {
arbolillo1.swapDepths(1);
arbolillo1.removeMovieClip();
} else if (_root.numarbolillos == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = arbolillos[i - 1].split(":");
_root.decoracion["arbolillo" + i]._x = mapainfo[0];
_root.decoracion["arbolillo" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = arbolillos[i - 1].split(":");
_root.decoracion["arbolillo" + i]._x = mapainfo[0];
_root.decoracion["arbolillo" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numarbolillos) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.arbolillo1.duplicateMovieClip("arbolillo" + i, _root.profundidad);
mapainfo = arbolillos[i - 1].split(":");
_root.decoracion["arbolillo" + i]._x = mapainfo[0];
_root.decoracion["arbolillo" + i]._y = mapainfo[1];
i++;
}
}
_root.numpinchos = pinchos.length;
if (_root.numpinchos == 0) {
pincho1.swapDepths(1);
pincho1.removeMovieClip();
} else if (_root.numpinchos == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = pinchos[i - 1].split(":");
_root.decoracion["pincho" + i]._x = mapainfo[0];
_root.decoracion["pincho" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = pinchos[i - 1].split(":");
_root.decoracion["pincho" + i]._x = mapainfo[0];
_root.decoracion["pincho" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numpinchos) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.pincho1.duplicateMovieClip("pincho" + i, _root.profundidad * 13500);
mapainfo = pinchos[i - 1].split(":");
_root.decoracion["pincho" + i]._x = mapainfo[0];
_root.decoracion["pincho" + i]._y = mapainfo[1];
i++;
}
}
_root.numranas = ranas.length;
if (_root.numranas == 0) {
rana1.swapDepths(1);
rana1.removeMovieClip();
} else if (_root.numranas == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = ranas[i - 1].split(":");
_root.decoracion["rana" + i]._x = mapainfo[0];
_root.decoracion["rana" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = ranas[i - 1].split(":");
_root.decoracion["rana" + i]._x = mapainfo[0];
_root.decoracion["rana" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numranas) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.rana1.duplicateMovieClip("rana" + i, _root.profundidad);
mapainfo = ranas[i - 1].split(":");
_root.decoracion["rana" + i]._x = mapainfo[0];
_root.decoracion["rana" + i]._y = mapainfo[1];
i++;
}
}
_root.numcocodrilos = cocodrilos.length;
if (_root.numcocodrilos == 0) {
cocodrilo1.swapDepths(1);
cocodrilo1.removeMovieClip();
} else if (_root.numcocodrilos == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = cocodrilos[i - 1].split(":");
_root.decoracion["cocodrilo" + i]._x = mapainfo[0];
_root.decoracion["cocodrilo" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = cocodrilos[i - 1].split(":");
_root.decoracion["cocodrilo" + i]._x = mapainfo[0];
_root.decoracion["cocodrilo" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numcocodrilos) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.cocodrilo1.duplicateMovieClip("cocodrilo" + i, _root.profundidad);
mapainfo = cocodrilos[i - 1].split(":");
_root.decoracion["cocodrilo" + i]._x = mapainfo[0];
_root.decoracion["cocodrilo" + i]._y = mapainfo[1];
i++;
}
}
_root.numrokalokas = rokalokas.length;
if (_root.numrokalokas == 0) {
rokaloka1.swapDepths(1);
rokaloka1.removeMovieClip();
} else if (_root.numrokalokas == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = rokalokas[i - 1].split(":");
_root.decoracion["rokaloka" + i]._x = mapainfo[0];
_root.decoracion["rokaloka" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = rokalokas[i - 1].split(":");
_root.decoracion["rokaloka" + i]._x = mapainfo[0];
_root.decoracion["rokaloka" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numrokalokas) {
_root.profundidad = _root.profundidad + 1;
mapainfo = rokalokas[i - 1].split(":");
if (mapainfo[2] == 1) {
_root.decoracion.rokaloka1.duplicateMovieClip("rokaloka" + i, _root.profundidad);
} else {
_root.decoracion.rokalokaarriba1.duplicateMovieClip("rokaloka" + i, _root.profundidad);
}
_root.decoracion["rokaloka" + i]._x = mapainfo[0];
_root.decoracion["rokaloka" + i]._y = mapainfo[1];
i++;
}
}
_root.numcalabazas = calabazas.length;
if (_root.numcalabazas == 0) {
calabaza1.swapDepths(1);
calabaza1.removeMovieClip();
} else if (_root.numcalabazas == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = calabazas[i - 1].split(":");
_root.decoracion["calabaza" + i]._x = mapainfo[0];
_root.decoracion["calabaza" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = calabazas[i - 1].split(":");
_root.decoracion["calabaza" + i]._x = mapainfo[0];
_root.decoracion["calabaza" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numcalabazas) {
_root.profundidad = _root.profundidad + 1;
_root.mundo.calabaza1.duplicateMovieClip("calabaza" + i, _root.profundidad);
mapainfo = calabazas[i - 1].split(":");
_root.decoracion["calabaza" + i]._x = mapainfo[0];
_root.decoracion["calabaza" + i]._y = mapainfo[1];
i++;
}
}
_root.numbatmans = batmans.length;
if (_root.numbatmans == 0) {
batman1.swapDepths(1);
batman1.removeMovieClip();
} else if (_root.numbatmans == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = batmans[i - 1].split(":");
_root.decoracion["batman" + i]._x = mapainfo[0];
_root.decoracion["batman" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = batmans[i - 1].split(":");
_root.decoracion["batman" + i]._x = mapainfo[0];
_root.decoracion["batman" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numbatmans) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.batman1.duplicateMovieClip("batman" + i, _root.profundidad);
mapainfo = batmans[i - 1].split(":");
_root.decoracion["batman" + i]._x = mapainfo[0];
_root.decoracion["batman" + i]._y = mapainfo[1];
i++;
}
}
_root.numcangrejos = cangrejos.length;
if (_root.numcangrejos == 0) {
cangrejo1.swapDepths(1);
cangrejo1.removeMovieClip();
} else if (_root.numcangrejos == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = cangrejos[i - 1].split(":");
_root.decoracion["cangrejo" + i]._x = mapainfo[0];
_root.decoracion["cangrejo" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = cangrejos[i - 1].split(":");
_root.decoracion["cangrejo" + i]._x = mapainfo[0];
_root.decoracion["cangrejo" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numcangrejos) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.cangrejo1.duplicateMovieClip("cangrejo" + i, _root.profundidad);
mapainfo = cangrejos[i - 1].split(":");
_root.decoracion["cangrejo" + i]._x = mapainfo[0];
_root.decoracion["cangrejo" + i]._y = mapainfo[1];
i++;
}
}
_root.numperas = peras.length;
if (_root.numperas == 0) {
pera1.swapDepths(1);
pera1.removeMovieClip();
} else if (_root.numperas == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = peras[i - 1].split(":");
_root.decoracion["pera" + i]._x = mapainfo[0];
_root.decoracion["pera" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = peras[i - 1].split(":");
_root.decoracion["pera" + i]._x = mapainfo[0];
_root.decoracion["pera" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numperas) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.pera1.duplicateMovieClip("pera" + i, _root.profundidad);
mapainfo = peras[i - 1].split(":");
_root.decoracion["pera" + i]._x = mapainfo[0];
_root.decoracion["pera" + i]._y = mapainfo[1];
i++;
}
}
_root.numstars = stars.length;
if (_root.numstars == 0) {
star1.swapDepths(1);
star1.removeMovieClip();
} else if (_root.numstars == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = stars[i - 1].split(":");
_root.decoracion["star" + i]._x = mapainfo[0];
_root.decoracion["star" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = stars[i - 1].split(":");
_root.decoracion["star" + i]._x = mapainfo[0];
_root.decoracion["star" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numstars) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.star1.duplicateMovieClip("star" + i, _root.profundidad);
mapainfo = stars[i - 1].split(":");
_root.decoracion["star" + i]._x = mapainfo[0];
_root.decoracion["star" + i]._y = mapainfo[1];
i++;
}
}
_root.numloops = loops.length;
if (_root.numloops == 0) {
loop1.swapDepths(1);
loop1.removeMovieClip();
} else if (_root.numloops == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = loops[i - 1].split(":");
_root.decoracion["loop" + i]._x = mapainfo[0];
_root.decoracion["loop" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = loops[i - 1].split(":");
_root.decoracion["loop" + i]._x = mapainfo[0];
_root.decoracion["loop" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numloops) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.loop1.duplicateMovieClip("loop" + i, _root.profundidad);
mapainfo = loops[i - 1].split(":");
_root.decoracion["loop" + i]._x = mapainfo[0];
_root.decoracion["loop" + i]._y = mapainfo[1];
i++;
}
}
_root.nummariquitas = mariquitas.length;
if (_root.nummariquitas == 0) {
mariquita1.swapDepths(1);
mariquita1.removeMovieClip();
} else if (_root.nummariquitas == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = mariquitas[i - 1].split(":");
_root.decoracion["mariquita" + i]._x = mapainfo[0];
_root.decoracion["mariquita" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = mariquitas[i - 1].split(":");
_root.decoracion["mariquita" + i]._x = mapainfo[0];
_root.decoracion["mariquita" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.nummariquitas) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.mariquita1.duplicateMovieClip("mariquita" + i, _root.profundidad);
mapainfo = mariquitas[i - 1].split(":");
_root.decoracion["mariquita" + i]._x = mapainfo[0];
_root.decoracion["mariquita" + i]._y = mapainfo[1];
i++;
}
}
_root.numlifes = lifes.length;
if (_root.numlifes == 0) {
life1.swapDepths(1);
life1.removeMovieClip();
} else if (_root.numlifes == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = lifes[i - 1].split(":");
_root.decoracion["life" + i]._x = mapainfo[0];
_root.decoracion["life" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = lifes[i - 1].split(":");
_root.decoracion["life" + i]._x = mapainfo[0];
_root.decoracion["life" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numlifes) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.life1.duplicateMovieClip("life" + i, _root.profundidad);
mapainfo = lifes[i - 1].split(":");
_root.decoracion["life" + i]._x = mapainfo[0];
_root.decoracion["life" + i]._y = mapainfo[1];
i++;
}
}
_root.numburbujas = burbujas.length;
if (_root.numburbujas == 0) {
burbuja1.swapDepths(1);
burbuja1.removeMovieClip();
} else if (_root.numburbujas == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = burbujas[i - 1].split(":");
_root.decoracion["burbuja" + i]._x = mapainfo[0];
_root.decoracion["burbuja" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = burbujas[i - 1].split(":");
_root.decoracion["burbuja" + i]._x = mapainfo[0];
_root.decoracion["burbuja" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numburbujas) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.burbuja1.duplicateMovieClip("burbuja" + i, _root.profundidad);
mapainfo = burbujas[i - 1].split(":");
_root.decoracion["burbuja" + i]._x = mapainfo[0];
_root.decoracion["burbuja" + i]._y = mapainfo[1];
i++;
}
}
_root.numavispas = avispas.length;
if (_root.numavispas == 0) {
avispa1.swapDepths(1);
avispa1.removeMovieClip();
} else if (_root.numavispas == 1) {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = avispas[i - 1].split(":");
_root.decoracion["avispa" + i]._x = mapainfo[0];
_root.decoracion["avispa" + i]._y = mapainfo[1];
} else {
_root.profundidad = _root.profundidad + 1;
i = 1;
mapainfo = avispas[i - 1].split(":");
_root.decoracion["avispa" + i]._x = mapainfo[0];
_root.decoracion["avispa" + i]._y = mapainfo[1];
i = 2;
while (i <= _root.numavispas) {
_root.profundidad = _root.profundidad + 1;
_root.decoracion.avispa1.duplicateMovieClip("avispa" + i, _root.profundidad);
mapainfo = avispas[i - 1].split(":");
_root.decoracion["avispa" + i]._x = mapainfo[0];
_root.decoracion["avispa" + i]._y = mapainfo[1];
i++;
}
}
}
function limpia_pantalla() {
stopAllSounds();
_root.sonic.swapDepths(1);
_root.sonic.removeMovieClip();
_root.final1.swapDepths(1);
_root.final1.removeMovieClip();
if (numplataformas != 0) {
i = 1;
while (i <= numplataformas) {
_root["plataforma2" + i].swapDepths(1);
_root["plataforma2" + i].removeMovieClip();
_root["platafddorema2" + i].swapDepths(1);
_root["platafddorema2" + i].removeMovieClip();
i++;
}
}
if (numcalabazas != 0) {
i = 1;
while (i <= numcalabazas) {
_root["calabaza" + i].swapDepths(1);
_root["calabza" + i].removeMovieClip();
i++;
}
}
if (numloops != 0) {
i = 1;
while (i <= numloops) {
_root["loop" + i].swapDepths(1);
_root["loop" + i].removeMovieClip();
i++;
}
}
if (nummariquitas != 0) {
i = 1;
while (i <= nummariquitas) {
_root["mariquita" + i].swapDepths(1);
_root["mariquita" + i].removeMovieClip();
i++;
}
}
if (numlifes != 0) {
i = 1;
while (i <= numlifes) {
_root["life" + i].swapDepths(1);
_root["life" + i].removeMovieClip();
i++;
}
}
if (numburbujas != 0) {
i = 1;
while (i <= numburbujas) {
_root["burbuja" + i].swapDepths(1);
_root["burbuja" + i].removeMovieClip();
i++;
}
}
if (numavispas != 0) {
i = 1;
while (i <= numavispas) {
_root["avispa" + i].swapDepths(1);
_root["avispa" + i].removeMovieClip();
i++;
}
}
if (numgordos != 0) {
i = 1;
while (i <= numgordos) {
_root["gordo" + i].removeMovieClip();
i++;
}
}
if (nummonedas != 0) {
i = 1;
while (i <= nummonedas) {
_root["moneda" + i].removeMovieClip();
i++;
}
}
if (numarbols != 0) {
i = 1;
while (i <= numarbols) {
_root["arbol" + i].removeMovieClip();
i++;
}
}
if (numgusanos != 0) {
i = 1;
while (i <= numgusanos) {
_root["gusano" + i].removeMovieClip();
i++;
}
}
if (nummuelles != 0) {
i = 1;
while (i <= nummuelles) {
_root["muelle" + i].removeMovieClip();
i++;
}
}
if (numtotems != 0) {
i = 1;
while (i <= numtotems) {
_root["totem" + i].removeMovieClip();
i++;
}
}
if (numflors != 0) {
i = 1;
while (i <= numflors) {
_root["flor" + i].removeMovieClip();
i++;
}
}
if (numarbolillos != 0) {
i = 1;
while (i <= numarbolillos) {
_root["arbolillo" + i].removeMovieClip();
i++;
}
}
if (numpinchos != 0) {
i = 1;
while (i <= numpinchos) {
_root["pincho" + i].removeMovieClip();
i++;
}
}
if (numranas != 0) {
i = 1;
while (i <= numranas) {
_root["rana" + i].removeMovieClip();
i++;
}
}
if (numcocodrilos != 0) {
i = 1;
while (i <= numcocodrilos) {
_root["cocodrilo" + i].removeMovieClip();
i++;
}
}
if (numrokalokas != 0) {
i = 1;
while (i <= numrokalokas) {
_root["rokaloka" + i].removeMovieClip();
i++;
}
}
if (numenefloras != 0) {
i = 1;
while (i <= numenefloras) {
_root["eneflora" + i].removeMovieClip();
i++;
}
}
if (numeneflors != 0) {
i = 1;
while (i <= numeneflors) {
_root["eneflor" + i].removeMovieClip();
i++;
}
}
if (nummagnetos != 0) {
i = 1;
while (i <= nummagnetos) {
_root["magneto" + i].removeMovieClip();
i++;
}
}
if (numpendulos != 0) {
i = 1;
while (i <= numpendulos) {
_root["pendulo" + i].removeMovieClip();
i++;
}
}
if (numbatmans != 0) {
i = 1;
while (i <= numbatmans) {
_root["batman" + i].removeMovieClip();
i++;
}
}
if (numcangrejos != 0) {
i = 1;
while (i <= numcangrejos) {
_root["cangrejo" + i].removeMovieClip();
i++;
}
}
if (numperas != 0) {
i = 1;
while (i <= numperas) {
_root["pera" + i].removeMovieClip();
i++;
}
}
if (numstars != 0) {
i = 1;
while (i <= numstars) {
_root["star" + i].removeMovieClip();
i++;
}
}
_root.final2.removeMovieClip();
}
function guardarDatos(person, frame, lifes, score, rings, completer) {
var _local1;
_local1 = SharedObject.getLocal("datos");
_local1.data.person = person;
_local1.data.frame = frame;
_local1.data.lifes = lifes;
_local1.data.score = score;
_local1.data.rings = rings;
_local1.data.completer = completer;
_local1.flush();
trace(person);
trace(frame);
trace(lifes);
trace(score);
trace(rings);
trace(completer);
}
function cargarDatos(dato) {
var _local1;
_local1 = SharedObject.getLocal("datos");
if (dato == "person") {
return(_local1.data.person);
}
if (dato == "frame") {
return(_local1.data.frame);
}
if (dato == "lifes") {
return(_local1.data.lifes);
}
if (dato == "score") {
return(_local1.data.score);
}
if (dato == "rings") {
return(_local1.data.rings);
}
if (dato == "completer") {
return(_local1.data.completer);
}
}
_root.vidas = 3;
_root.rings = 0;
_root.puntos = 0;
_root.numplataformas = 0;
_root.numgusanos = 0;
_root.nummonedas = 0;
_root.nummuelles = 0;
_root.numtotems = 0;
_root.numflors = 0;
_root.numgordos = 0;
_root.numarbols = 0;
_root.numarbolillos = 0;
_root.numpinchos = 0;
_root.numranas = 0;
_root.numcocodrilos = 0;
_root.numrokalokas = 0;
_root.numcalabazas = 0;
_root.numbatmans = 0;
_root.numcangrejos = 0;
_root.numperas = 0;
_root.numstars = 0;
_root.numloops = 0;
_root.nummariquitas = 0;
_root.numlifes = 0;
_root.numburbujas = 0;
_root.numavispas = 0;
_root.numpendulos = 0;
_root.nummagnetos = 0;
_root.numeneflors = 0;
_root.numenefloras = 0;
limpia_pantalla();
stop();
Frame 100
limpia_pantalla();
stop();
Frame 101
if (numplataformas != 0) {
i = 1;
while (i <= numplataformas) {
_root["plataforma2" + i].swapDepths(1);
_root["plataforma2" + i].removeMovieClip();
i++;
}
}
if (numcalabazas != 0) {
i = 1;
while (i <= numcalabazas) {
_root["calabaza" + i].swapDepths(1);
_root["calabza" + i].removeMovieClip();
i++;
}
}
if (numloops != 0) {
i = 1;
while (i <= numloops) {
_root["loop" + i].swapDepths(1);
_root["loop" + i].removeMovieClip();
i++;
}
}
if (nummariquitas != 0) {
i = 1;
while (i <= nummariquitas) {
_root["mariquita" + i].swapDepths(1);
_root["mariquita" + i].removeMovieClip();
i++;
}
}
if (numlifes != 0) {
i = 1;
while (i <= numlifes) {
_root["life" + i].swapDepths(1);
_root["life" + i].removeMovieClip();
i++;
}
}
if (numburbujas != 0) {
i = 1;
while (i <= numburbujas) {
_root["burbuja" + i].swapDepths(1);
_root["burbuja" + i].removeMovieClip();
i++;
}
}
if (numavispas != 0) {
i = 1;
while (i <= numavispas) {
_root["avispa" + i].swapDepths(1);
_root["avispa" + i].removeMovieClip();
i++;
}
}
if (numgordos != 0) {
i = 1;
while (i <= numgordos) {
_root["gordo" + i].removeMovieClip();
i++;
}
}
if (nummonedas != 0) {
i = 1;
while (i <= nummonedas) {
_root["moneda" + i].removeMovieClip();
i++;
}
}
if (numarbols != 0) {
i = 1;
while (i <= numarbols) {
_root["arbol" + i].removeMovieClip();
i++;
}
}
if (numgusanos != 0) {
i = 1;
while (i <= numgusanos) {
_root["gusano" + i].removeMovieClip();
i++;
}
}
if (nummuelles != 0) {
i = 1;
while (i <= nummuelles) {
_root["muelle" + i].removeMovieClip();
i++;
}
}
if (numtotems != 0) {
i = 1;
while (i <= numtotems) {
_root["totem" + i].removeMovieClip();
i++;
}
}
if (numflors != 0) {
i = 1;
while (i <= numflors) {
_root["flor" + i].removeMovieClip();
i++;
}
}
if (numarbolillos != 0) {
i = 1;
while (i <= numarbolillos) {
_root["arbolillo" + i].removeMovieClip();
i++;
}
}
if (numpinchos != 0) {
i = 1;
while (i <= numpinchos) {
_root["pincho" + i].removeMovieClip();
i++;
}
}
if (numranas != 0) {
i = 1;
while (i <= numranas) {
_root["rana" + i].removeMovieClip();
i++;
}
}
if (numcocodrilos != 0) {
i = 1;
while (i <= numcocodrilos) {
_root["cocodrilo" + i].removeMovieClip();
i++;
}
}
if (numrokalokas != 0) {
i = 1;
while (i <= numrokalokas) {
_root["rokaloka" + i].removeMovieClip();
i++;
}
}
if (numbatmans != 0) {
i = 1;
while (i <= numbatmans) {
_root["batman" + i].removeMovieClip();
i++;
}
}
if (numcangrejos != 0) {
i = 1;
while (i <= numcangrejos) {
_root["cangrejo" + i].removeMovieClip();
i++;
}
}
if (numperas != 0) {
i = 1;
while (i <= numperas) {
_root["pera" + i].removeMovieClip();
i++;
}
}
if (numstars != 0) {
i = 1;
while (i <= numstars) {
_root["star" + i].removeMovieClip();
i++;
}
}
limpia_pantalla();
stop();
Frame 102
limpia_pantalla();
if (_root.vidas < 0) {
gotoAndPlay ("gameover");
} else {
stop();
}
Frame 103
_root.cargandillo._alpha = 100;
_root.profundidad = 0;
_root.frame = 103;
_root.siguiente = 104;
_root.temp = 100;
_root.movimiento = 0;
_root.gravedad = 1;
_root.balas = 1;
_root.nivel = 1;
final = "5900:5";
var mapa = new Array();
var gusanos = new Array();
var monedas = new Array();
var muelles = new Array();
var totems = new Array();
var flors = new Array();
var gordos = new Array();
var arbols = new Array();
var arbolillos = new Array();
var pinchos = new Array();
var ranas = new Array();
var cocodrilos = new Array();
var rokalokas = new Array();
var batmans = new Array();
var calabazas = new Array();
var cangrejos = new Array();
var peras = new Array();
var stars = new Array();
var loops = new Array();
var mariquitas = new Array();
var lifes = new Array();
var burbujas = new Array();
var avispas = new Array();
var enefloras = new Array();
var eneflors = new Array();
var magnetos = new Array();
var pendulos = new Array();
final = "5900:5";
mapa.push("512:127:-50017:453.25:1");
mapa.push("512:127:-50017:453.25:2");
mapa.push("512:127:-50017:453.25:3");
mapa.push("512:127:-50017:453.25:4");
mapa.push("512:127:-50017:453.25:5");
mapa.push("512:127:-50017:453.25:6");
mapa.push("512:127:-50017:453.25:7");
mapa.push("512:127:-50017:453.25:8");
mapa.push("512:127:-50017:453.25:9");
mapa.push("512:127:-50017:453.25:10");
mapa.push("512:127:-50017:453.25:11");
mapa.push("512:127:-50017:453.25:12");
mapa.push("512:127:-50017:453.25:13");
mapa.push("512:127:-50017:453.25:14");
mapa.push("512:127:-50017:453.25:15");
mapa.push("512:127:-50017:453.25:16");
mapa.push("512:127:-50017:453.25:17");
mapa.push("512:127:-50017:453.25:18");
mapa.push("512:127:-50017:453.25:19");
mapa.push("512:127:-50017:453.25:20");
mapa.push("512:127:-50017:453.25:21");
mapa.push("512:127:-50017:453.25:22");
mapa.push("512:127:-50017:453.25:23");
mariquitas.push("-50017.25:206.25");
mariquitas.push("-50017.25:206.25");
mapa.push("256:256:257.75:591.25:4");
mapa.push("256:256:507.75:591.25:4");
mapa.push("256:256:757.75:591.25:4");
mapa.push("256:256:1007.75:691.25:4");
mapa.push("256:256:1257.75:691.25:4");
mapa.push("256:256:1512.75:621.25:4");
mapa.push("256:256:1762.75:536.25:4");
mapa.push("256:256:2022.75:471.25:4");
mapa.push("256:256:2277.75:471.25:4");
mapa.push("256:256:2532.75:471.25:4");
mapa.push("256:256:2782.75:471.25:4");
mapa.push("256:256:3037.75:581.25:4");
mapa.push("256:256:3292.75:581.25:4");
mapa.push("256:256:3547.75:581.25:4");
mapa.push("256:256:3802.75:581.25:4");
mapa.push("256:256:4057.75:651.25:4");
mapa.push("256:256:4312.75:651.25:4");
mapa.push("256:256:4567.75:651.25:4");
mapa.push("256:256:4822.75:651.25:4");
mapa.push("256:256:5077.75:651.25:4");
mapa.push("256:256:5332.75:651.25:4");
mapa.push("256:256:5587.75:651.25:4");
mapa.push("256:256:5842.75:651.25:4");
mapa.push("256:256:6097.75:651.25:4");
mapa.push("128:128:4572.5:391.25:13");
mapa.push("128:128:4572.5:396.25:13");
mapa.push("128:128:5297.5:396.25:13");
mapa.push("64:32:3021.5:176:5");
mapa.push("64:32:3326.5:146:5");
mapa.push("64:32:3611.5:106:5");
burbujas.push("2587.5:-1090");
lifes.push("3586.75:62");
pinchos.push("823.25:416.5");
pinchos.push("853.25:416.5");
pinchos.push("1928.25:201.5");
pinchos.push("1958.25:201.5");
pinchos.push("3093.25:306.5");
pinchos.push("3128.25:306.5");
pinchos.push("3163.25:306.5");
pinchos.push("4028.25:381.5");
pinchos.push("4063.25:381.5");
pinchos.push("5258.25:261.5");
mariquitas.push("2354.5:185.75");
mariquitas.push("4319.5:360.75");
mariquitas.push("4999.5:360.75");
mariquitas.push("3679.5:295.75");
mariquitas.push("1139.5:415.75");
monedas.push("947:399");
monedas.push("972:399");
monedas.push("997:399");
monedas.push("1022:399");
monedas.push("1047:399");
monedas.push("1072:399");
monedas.push("1097:399");
monedas.push("1122:399");
monedas.push("1147:399");
monedas.push("1172:399");
monedas.push("2017:159");
monedas.push("2042:159");
monedas.push("2067:159");
monedas.push("2092:159");
monedas.push("2117:159");
monedas.push("2142:159");
monedas.push("2167:159");
monedas.push("2192:159");
monedas.push("2217:159");
monedas.push("2242:159");
monedas.push("2267:159");
monedas.push("2292:159");
monedas.push("2317:159");
monedas.push("2342:159");
monedas.push("2367:159");
monedas.push("2392:159");
monedas.push("2417:159");
monedas.push("2442:159");
monedas.push("2467:159");
monedas.push("2492:159");
monedas.push("2517:159");
monedas.push("2542:159");
monedas.push("2567:159");
monedas.push("2592:159");
monedas.push("2617:159");
monedas.push("2642:159");
monedas.push("2667:159");
monedas.push("2692:159");
monedas.push("2717:159");
monedas.push("2742:159");
monedas.push("3322:274");
monedas.push("3347:274");
monedas.push("3372:274");
monedas.push("3397:274");
monedas.push("3422:274");
monedas.push("3447:274");
monedas.push("3472:274");
monedas.push("3497:274");
monedas.push("3522:274");
monedas.push("3547:274");
monedas.push("3572:274");
monedas.push("3597:274");
monedas.push("3622:274");
monedas.push("3647:274");
monedas.push("3672:274");
monedas.push("3697:274");
monedas.push("3722:274");
monedas.push("3747:274");
monedas.push("3772:274");
monedas.push("3797:274");
monedas.push("4607:324");
monedas.push("4632:324");
monedas.push("4657:324");
monedas.push("4682:324");
monedas.push("4707:324");
monedas.push("4732:324");
monedas.push("4757:324");
monedas.push("4782:324");
monedas.push("4807:324");
monedas.push("4832:324");
monedas.push("4857:324");
monedas.push("4882:324");
monedas.push("4907:324");
monedas.push("4932:324");
monedas.push("4957:324");
monedas.push("4982:324");
monedas.push("5007:324");
monedas.push("5032:324");
monedas.push("5057:324");
monedas.push("5082:324");
monedas.push("5652:324");
monedas.push("5677:324");
monedas.push("5702:324");
monedas.push("5727:324");
monedas.push("5752:324");
monedas.push("5777:324");
monedas.push("5802:324");
monedas.push("5827:324");
monedas.push("5852:324");
monedas.push("5877:324");
monedas.push("17:284");
monedas.push("42:284");
monedas.push("67:284");
monedas.push("92:284");
monedas.push("117:284");
monedas.push("142:284");
monedas.push("167:284");
monedas.push("192:284");
monedas.push("217:284");
monedas.push("242:284");
monedas.push("267:284");
monedas.push("292:284");
monedas.push("317:284");
monedas.push("342:284");
monedas.push("367:284");
monedas.push("392:284");
monedas.push("417:284");
monedas.push("442:284");
monedas.push("467:284");
monedas.push("492:284");
monedas.push("517:284");
monedas.push("542:284");
monedas.push("567:284");
monedas.push("592:284");
monedas.push("617:284");
monedas.push("642:284");
monedas.push("667:284");
monedas.push("692:284");
monedas.push("717:284");
monedas.push("742:284");
monedas.push("2958:128.5");
monedas.push("2973:128.5");
monedas.push("2988:128.5");
monedas.push("3003:128.5");
monedas.push("3023:128.5");
monedas.push("3263:98.5");
monedas.push("3278:98.5");
monedas.push("3298:98.5");
monedas.push("3318:98.5");
monedas.push("3333:98.5");
monedas.push("3518:-771.5");
mapa.push("72:120:1601.25:283:15");
mapa.push("72:120:656.25:333:15");
mapa.push("72:120:5546.25:393:15");
mapa.push("64:131:2141.25:221:7");
mapa.push("64:131:2981.25:326:7");
mapa.push("64:131:4176.25:401:7");
mapa.push("64:131:1076.25:441:7");
mapa.push("64:32:4761.5:221:5");
mapa.push("64:32:4981.5:221:5");
split_map();
if (_root.person == "sonic") {
_root.soni._name = "sonic";
} else if (_root.person == "tails") {
_root.tails._name = "sonic";
} else if (_root.person == "knuckles") {
_root.knuckles._name = "sonic";
} else if (_root.person == "amy") {
_root.amy._name = "sonic";
} else if (_root.person == "shadow") {
_root.shadow._name = "sonic";
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
CuentaAtras = Math.round(getTimer() / 1000) + temp;
_root.onEnterFrame = function () {
_root.cargandillo._alpha = 0;
Tiempo = Math.round(getTimer() / 1000);
Restante = CuentaAtras - Tiempo;
if (Restante < 0) {
_root.sonic.reset();
}
};
stop();
Instance of Symbol 123 MovieClip "fondo" in Frame 103
onClipEvent (enterFrame) {
this._x = this._x - (_root.movimiento / 10);
}
Instance of Symbol 214 MovieClip "knuckles" in Frame 103
onClipEvent (load) {
function rebota(pot) {
this.estado = "saltando";
this.gravedad = 1;
this.potencia = -pot;
this.gotoAndStop(5);
}
function reset() {
if (this.estado != "muerto") {
if (this.burbu == 0) {
this.swapDepths(-16313);
_root.vidas = _root.vidas - 1;
this.gravedad = 2;
this.potencia = this.saltemos;
this.estado = "muerto";
this.gotoAndStop(7);
this.tocandosuelo = 0;
this._y = this._y - 10;
misonidra = new Sound();
misonidra.attachSound("sonic_dead");
misonidra.start();
} else {
this.burbu = 0;
this.esfera1._alpha = 0;
this.rebota("20");
}
}
}
function recalculate() {
if (this.lado == "izquierda") {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = (this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.cos(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal3 = (this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.sin(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
} else {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
}
}
this.maxgiro = 10;
this.gira = 0;
suena = 0;
this.imposible = "ninguno";
this.vel = 0;
this.estado = "normal";
this.lado = "derecha";
this.gravedad = 2;
this.burbu = 0;
this.potencia = 0;
this.caida = 2;
this.cuentador = 0;
this.bolandosuelo = 0;
this.corte = 10;
this.tocandosuelo = 0;
this.aceleracion = 5;
this.rozamiento = 5;
this.maxvel = 30;
this.desfase = 0;
this.desfassealtura = 1;
this.rotacion = 2;
this.atacando = 0;
this.saltemos = -20;
this.gravedad = 1;
this.caida = 1;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.swapDepths(_root.getNextHighestDepth());
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this._name == "sonic") {
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
recalculate();
this.tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this.tocandosuelo = 1;
}
i++;
}
if (this.estado == "esperando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "normal") {
this.cuentador++;
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.cuentador >= 36) {
this.cuentador = 0;
this.estado = "esperando";
this.gotoAndStop(1);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "andando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(40)) {
this.estado = "rodando";
this.gotoAndStop(5);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && (Key.isDown(39)))) {
this.estado = "frenando";
this.gotoAndStop(6);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "saltando") {
this._rotation = 0;
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
}
} else if (this.estado == "frenando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "muerto") {
} else if (this.estado == "pegando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
}
} else if (this.estado == "rodando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
}
if (this.estado == "esperando") {
this.atacando = 0;
} else if (this.estado == "normal") {
this.atacando = 0;
} else if (this.estado == "andando") {
this.atacando = 0;
} else if (this.estado == "corriendo") {
this.atacando = 0;
} else if (this.estado == "saltando") {
this.atacando = 1;
} else if (this.estado == "muerto") {
this.atacando = 0;
} else if (this.estado == "pegando") {
this.atacando = 1;
} else if (this.estado == "rodando") {
this.atacando = 1;
}
if (Key.isDown(37)) {
if (this.vel > (-this.maxvel)) {
this.vel = this.vel - this.aceleracion;
}
} else if (Key.isDown(39)) {
if (this.vel < this.maxvel) {
this.vel = this.vel + this.aceleracion;
}
} else if (this.vel > 0) {
this.vel = this.vel - this.rozamiento;
} else if (this.vel < 0) {
this.vel = this.vel + this.rozamiento;
}
if (this.potencia > 30) {
this.potencia = 30;
}
if ((this.vel < 0) && (this.lado == "derecha")) {
this._xscale = -100;
this._x = this._x + (this._width / 2);
this.lado = "izquierda";
}
if ((this.vel > 0) && (this.lado == "izquierda")) {
this._xscale = 100;
this._x = this._x - (this._width / 2);
this.lado = "derecha";
}
if (this.tocandosuelo == 0) {
this._y = this._y + this.potencia;
this.potencia = this.potencia + this.gravedad;
} else {
this.potencia = 0;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
this._y = this._y + 1;
recalculate();
}
this._y = this._y - 1;
this.potencia = this.potencia * -1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
this.x_temporal = this.x_temporal + this.vel;
this.imposible = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal, this.y_temporal, true)) {
this.imposible = 1;
}
i++;
}
if (this.imposible == 0) {
if (this.tocandosuelo == 0) {
if (this.lado == "izquierda") {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
} else {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
}
} else {
this._x = this._x + this.vel;
}
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
if (((this._x > 300) && (this.lado == "derecha")) || ((this._x < 200) && (this.lado == "izquierda"))) {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
_root.movimiento = Math.cos((this._rotation * Math.PI) / 180) * this.vel;
} else {
_root.movimiento = 0;
}
if (this._y > 600) {
this.reset();
}
this.y = this._y;
this.x = this._x;
this.height = this._height;
this.width = this._width;
this.rotation = this._rotation;
_root.bola1._x = this.x_temporal;
_root.bola1._y = this.y_temporal;
_root.bola2._x = this.x_temporal2;
_root.bola2._y = this.y_temporal2;
_root.bola3._x = this.x_temporal3;
_root.bola3._y = this.y_temporal3;
_root.bola4._x = this.x_temporal4;
_root.bola4._y = this.y_temporal4;
_root.bola5._x = this.x_temporal5;
_root.bola5._y = this.y_temporal5;
}
}
Instance of Symbol 312 MovieClip "tails" in Frame 103
onClipEvent (load) {
function rebota(pot) {
this.estado = "saltando";
this.gravedad = 1;
this.potencia = -pot;
this.gotoAndStop(5);
}
function reset() {
if (this.estado != "muerto") {
if (this.burbu == 0) {
this.swapDepths(-16313);
_root.vidas = _root.vidas - 1;
this.gravedad = 2;
this.potencia = this.saltemos;
this.estado = "muerto";
this.gotoAndStop(7);
this.tocandosuelo = 0;
this._y = this._y - 10;
misonidra = new Sound();
misonidra.attachSound("sonic_dead");
misonidra.start();
} else {
this.burbu = 0;
this.esfera1._alpha = 0;
this.rebota("16");
}
}
}
function recalculate() {
if (this.lado == "izquierda") {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = (this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.cos(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal3 = (this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.sin(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
} else {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
}
}
this.maxgiro = 10;
this.gira = 0;
suena = 0;
this.imposible = "ninguno";
this.vel = 0;
this.estado = "normal";
this.lado = "derecha";
this.gravedad = 2;
this.burbu = 0;
this.potencia = 0;
this.caida = 2;
this.cuentador = 0;
this.bolandosuelo = 0;
this.corte = 10;
this.tocandosuelo = 0;
this.aceleracion = 5;
this.rozamiento = 5;
this.maxvel = 20;
this.desfase = 0;
this.desfassealtura = 1;
this.rotacion = 2;
this.atacando = 0;
this.saltemos = -30;
this.gravedad = 1;
this.caida = 1;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.swapDepths(_root.getNextHighestDepth());
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this._name == "sonic") {
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
recalculate();
this.tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this.tocandosuelo = 1;
}
i++;
}
if (this.estado == "esperando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "normal") {
this.cuentador++;
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.cuentador >= 36) {
this.cuentador = 0;
this.estado = "esperando";
this.gotoAndStop(1);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "andando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(40)) {
this.estado = "rodando";
this.gotoAndStop(5);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && (Key.isDown(39)))) {
this.estado = "frenando";
this.gotoAndStop(6);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "saltando") {
this._rotation = 0;
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (this.potencia > 0) {
this.estado = "volando";
this.gotoAndStop(4);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "volando") {
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "frenando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "muerto") {
} else if (this.estado == "pegando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
}
} else if (this.estado == "rodando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
}
if (this.estado == "esperando") {
this.atacando = 0;
} else if (this.estado == "normal") {
this.atacando = 0;
} else if (this.estado == "andando") {
this.atacando = 0;
} else if (this.estado == "corriendo") {
this.atacando = 0;
} else if (this.estado == "saltando") {
this.atacando = 1;
} else if (this.estado == "muerto") {
this.atacando = 0;
} else if (this.estado == "pegando") {
this.atacando = 1;
} else if (this.estado == "rodando") {
this.atacando = 1;
}
if (Key.isDown(37)) {
if (this.vel > (-this.maxvel)) {
this.vel = this.vel - this.aceleracion;
}
} else if (Key.isDown(39)) {
if (this.vel < this.maxvel) {
this.vel = this.vel + this.aceleracion;
}
} else if (this.vel > 0) {
this.vel = this.vel - this.rozamiento;
} else if (this.vel < 0) {
this.vel = this.vel + this.rozamiento;
}
if (this.potencia > 30) {
this.potencia = 30;
}
if ((this.vel < 0) && (this.lado == "derecha")) {
this._xscale = -100;
this._x = this._x + (this._width / 2);
this.lado = "izquierda";
}
if ((this.vel > 0) && (this.lado == "izquierda")) {
this._xscale = 100;
this._x = this._x - (this._width / 2);
this.lado = "derecha";
}
if (this.tocandosuelo == 0) {
if (this.estado == "volando") {
this._y = this._y + this.gravedad;
} else {
this._y = this._y + this.potencia;
this.potencia = this.potencia + this.gravedad;
}
} else {
this.potencia = 0;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
this._y = this._y + 1;
recalculate();
}
this._y = this._y - 1;
this.potencia = this.potencia * -1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
this.x_temporal = this.x_temporal + this.vel;
this.imposible = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal, this.y_temporal, true)) {
this.imposible = 1;
}
i++;
}
if (this.imposible == 0) {
if (this.tocandosuelo == 0) {
if (this.lado == "izquierda") {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
} else {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
}
} else {
this._x = this._x + this.vel;
}
}
if (((this._x > 300) && (this.lado == "derecha")) || ((this._x < 200) && (this.lado == "izquierda"))) {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
_root.movimiento = Math.cos((this._rotation * Math.PI) / 180) * this.vel;
} else {
_root.movimiento = 0;
}
if (this._y > 600) {
this.reset();
}
this.y = this._y;
this.x = this._x;
this.height = this._height;
this.width = this._width;
this.rotation = this._rotation;
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
_root.bola1._x = this.x_temporal;
_root.bola1._y = this.y_temporal;
_root.bola2._x = this.x_temporal2;
_root.bola2._y = this.y_temporal2;
_root.bola3._x = this.x_temporal3;
_root.bola3._y = this.y_temporal3;
_root.bola4._x = this.x_temporal4;
_root.bola4._y = this.y_temporal4;
_root.bola5._x = this.x_temporal5;
_root.bola5._y = this.y_temporal5;
}
}
Instance of Symbol 465 MovieClip "shadow" in Frame 103
onClipEvent (load) {
function rebota(pot) {
this.estado = "saltando";
this.gravedad = 1;
this.potencia = -pot;
this.gotoAndStop(5);
}
function reset() {
if (this.estado != "muerto") {
if (this.burbu == 0) {
this.swapDepths(-16313);
_root.vidas = _root.vidas - 1;
this.gravedad = 2;
this.potencia = this.saltemos;
this.estado = "muerto";
this.gotoAndStop(7);
this.tocandosuelo = 0;
this._y = this._y - 10;
misonidra = new Sound();
misonidra.attachSound("sonic_dead");
misonidra.start();
} else {
this.burbu = 0;
this.esfera1._alpha = 0;
this.rebota("16");
}
}
}
function recalculate() {
if (this.lado == "izquierda") {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = (this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.cos(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal3 = (this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.sin(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
} else {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
}
}
this.maxgiro = 10;
this.gira = 0;
suena = 0;
this.imposible = "ninguno";
this.vel = 0;
this.estado = "normal";
this.lado = "derecha";
this.gravedad = 2;
this.burbu = 0;
this.potencia = 0;
this.caida = 2;
this.cuentador = 0;
this.bolandosuelo = 0;
this.corte = 10;
this.tocandosuelo = 0;
this.aceleracion = 5;
this.rozamiento = 5;
this.maxvel = 20;
this.desfase = 0;
this.desfassealtura = 1;
this.rotacion = 2;
this.atacando = 0;
this.saltemos = -25;
this.gravedad = 1;
this.caida = 1;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.swapDepths(_root.getNextHighestDepth());
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this._name == "sonic") {
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
recalculate();
this.tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this.tocandosuelo = 1;
}
i++;
}
if (this.estado == "esperando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "normal") {
this.cuentador++;
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.cuentador >= 36) {
this.cuentador = 0;
this.estado = "esperando";
this.gotoAndStop(1);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "andando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && (Key.isDown(39)))) {
this.estado = "frenando";
this.gotoAndStop(6);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "bajando") {
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegandoaire";
this.gotoAndStop(9);
}
} else if (this.estado == "saltando") {
this._rotation = 0;
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (this.potencia > 0) {
this.estado = "bajando";
this.gotoAndStop(4);
} else if (Key.isDown(32)) {
this.estado = "pegandoaire";
this.gotoAndStop(9);
}
} else if (this.estado == "frenando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "muerto") {
} else if (this.estado == "pegando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
}
} else if (this.estado == "rodando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
}
if (this.estado == "esperando") {
this.atacando = 0;
} else if (this.estado == "normal") {
this.atacando = 0;
} else if (this.estado == "andando") {
this.atacando = 0;
} else if (this.estado == "corriendo") {
this.atacando = 0;
} else if (this.estado == "saltando") {
this.atacando = 0;
} else if (this.estado == "bajando") {
this.atacando = 0;
} else if (this.estado == "muerto") {
this.atacando = 0;
} else if (this.estado == "pegando") {
this.atacando = 1;
} else if (this.estado == "pegandoaire") {
this.atacando = 1;
} else if (this.estado == "rodando") {
this.atacando = 1;
}
if (Key.isDown(37)) {
if (this.vel > (-this.maxvel)) {
this.vel = this.vel - this.aceleracion;
}
} else if (Key.isDown(39)) {
if (this.vel < this.maxvel) {
this.vel = this.vel + this.aceleracion;
}
} else if (this.vel > 0) {
this.vel = this.vel - this.rozamiento;
} else if (this.vel < 0) {
this.vel = this.vel + this.rozamiento;
}
if (this.potencia > 30) {
this.potencia = 30;
}
if ((this.vel < 0) && (this.lado == "derecha")) {
this._xscale = -100;
this._x = this._x + (this._width / 2);
this.lado = "izquierda";
}
if ((this.vel > 0) && (this.lado == "izquierda")) {
this._xscale = 100;
this._x = this._x - (this._width / 2);
this.lado = "derecha";
}
if (this.tocandosuelo == 0) {
this._y = this._y + this.potencia;
this.potencia = this.potencia + this.gravedad;
} else {
this.potencia = 0;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
this._y = this._y + 1;
recalculate();
}
this._y = this._y - 1;
this.potencia = this.potencia * -1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
this.x_temporal = this.x_temporal + this.vel;
this.imposible = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal, this.y_temporal, true)) {
this.imposible = 1;
}
i++;
}
if (this.imposible == 0) {
if (this.tocandosuelo == 0) {
if (this.lado == "izquierda") {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
} else {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
}
} else {
this._x = this._x + this.vel;
}
}
if (((this._x > 300) && (this.lado == "derecha")) || ((this._x < 200) && (this.lado == "izquierda"))) {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
_root.movimiento = Math.cos((this._rotation * Math.PI) / 180) * this.vel;
} else {
_root.movimiento = 0;
}
if (this._y > 600) {
this.reset();
}
this.y = this._y;
this.x = this._x;
this.height = this._height;
this.width = this._width;
this.rotation = this._rotation;
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
_root.bola1._x = this.x_temporal;
_root.bola1._y = this.y_temporal;
_root.bola2._x = this.x_temporal2;
_root.bola2._y = this.y_temporal2;
_root.bola3._x = this.x_temporal3;
_root.bola3._y = this.y_temporal3;
_root.bola4._x = this.x_temporal4;
_root.bola4._y = this.y_temporal4;
_root.bola5._x = this.x_temporal5;
_root.bola5._y = this.y_temporal5;
}
}
Instance of Symbol 588 MovieClip "amy" in Frame 103
onClipEvent (load) {
function rebota(pot) {
this.estado = "saltando";
this.gravedad = 1;
this.potencia = -pot;
this.gotoAndStop(5);
}
function reset() {
if (this.estado != "muerto") {
if (this.burbu == 0) {
this.swapDepths(-16313);
_root.vidas = _root.vidas - 1;
this.gravedad = 2;
this.potencia = this.saltemos;
this.estado = "muerto";
this.gotoAndStop(7);
this.tocandosuelo = 0;
this._y = this._y - 10;
misonidra = new Sound();
misonidra.attachSound("sonic_dead");
misonidra.start();
} else {
this.burbu = 0;
this.esfera1._alpha = 0;
this.rebota("16");
}
}
}
function recalculate() {
if (this.lado == "izquierda") {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = (this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.cos(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal3 = (this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.sin(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
} else {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
}
}
this.gira = 0;
suena = 0;
this.imposible = "ninguno";
this.vel = 0;
this.estado = "normal";
this.lado = "derecha";
this.gravedad = 2;
this.burbu = 0;
this.potencia = 0;
this.caida = 2;
this.cuentador = 0;
this.bolandosuelo = 0;
this.corte = 10;
this.tocandosuelo = 0;
this.maxvel = 20;
this.desfase = 0;
this.desfassealtura = 1;
this.rotacion = 2;
this.atacando = 0;
this.maxgiro = 10;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.gravedad = 1;
this.caida = 1;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.swapDepths(_root.getNextHighestDepth());
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this._name == "sonic") {
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
recalculate();
this.tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this.tocandosuelo = 1;
}
i++;
}
if (this.estado == "esperando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "normal") {
this.cuentador++;
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.cuentador >= 36) {
this.cuentador = 0;
this.estado = "esperando";
this.gotoAndStop(1);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "andando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && (Key.isDown(39)))) {
this.estado = "frenando";
this.gotoAndStop(6);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "bajando") {
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegandoaire";
this.gotoAndStop(9);
}
} else if (this.estado == "saltando") {
this._rotation = 0;
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (this.potencia > 0) {
this.estado = "bajando";
this.gotoAndStop(4);
} else if (Key.isDown(32)) {
this.estado = "pegandoaire";
this.gotoAndStop(9);
}
} else if (this.estado == "frenando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "muerto") {
} else if (this.estado == "pegando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
}
} else if (this.estado == "rodando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
}
if (this.estado == "esperando") {
this.atacando = 0;
} else if (this.estado == "normal") {
this.atacando = 0;
} else if (this.estado == "andando") {
this.atacando = 0;
} else if (this.estado == "corriendo") {
this.atacando = 0;
} else if (this.estado == "saltando") {
this.atacando = 0;
} else if (this.estado == "bajando") {
this.atacando = 0;
} else if (this.estado == "muerto") {
this.atacando = 0;
} else if (this.estado == "pegando") {
this.atacando = 1;
} else if (this.estado == "pegandoaire") {
this.atacando = 1;
} else if (this.estado == "rodando") {
this.atacando = 1;
}
if (Key.isDown(37)) {
if (this.vel > (-this.maxvel)) {
this.vel = this.vel - this.aceleracion;
}
} else if (Key.isDown(39)) {
if (this.vel < this.maxvel) {
this.vel = this.vel + this.aceleracion;
}
} else if (this.vel > 0) {
this.vel = this.vel - this.rozamiento;
} else if (this.vel < 0) {
this.vel = this.vel + this.rozamiento;
}
if (this.potencia > 30) {
this.potencia = 30;
}
if ((this.vel < 0) && (this.lado == "derecha")) {
this._xscale = -100;
this._x = this._x + (this._width / 2);
this.lado = "izquierda";
}
if ((this.vel > 0) && (this.lado == "izquierda")) {
this._xscale = 100;
this._x = this._x - (this._width / 2);
this.lado = "derecha";
}
if (this.tocandosuelo == 0) {
this._y = this._y + this.potencia;
this.potencia = this.potencia + this.gravedad;
} else {
this.potencia = 0;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
this._y = this._y + 1;
recalculate();
}
this._y = this._y - 1;
this.potencia = this.potencia * -1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
this.x_temporal = this.x_temporal + this.vel;
this.imposible = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal, this.y_temporal, true)) {
this.imposible = 1;
}
i++;
}
if (this.imposible == 0) {
if (this.tocandosuelo == 0) {
if (this.lado == "izquierda") {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
} else {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
}
} else {
this._x = this._x + this.vel;
}
}
if (((this._x > 300) && (this.lado == "derecha")) || ((this._x < 200) && (this.lado == "izquierda"))) {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
_root.movimiento = Math.cos((this._rotation * Math.PI) / 180) * this.vel;
} else {
_root.movimiento = 0;
}
if (this._y > 600) {
this.reset();
}
this.y = this._y;
this.x = this._x;
this.height = this._height;
this.width = this._width;
this.rotation = this._rotation;
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
_root.bola1._x = this.x_temporal;
_root.bola1._y = this.y_temporal;
_root.bola2._x = this.x_temporal2;
_root.bola2._y = this.y_temporal2;
_root.bola3._x = this.x_temporal3;
_root.bola3._y = this.y_temporal3;
_root.bola4._x = this.x_temporal4;
_root.bola4._y = this.y_temporal4;
_root.bola5._x = this.x_temporal5;
_root.bola5._y = this.y_temporal5;
}
}
Instance of Symbol 683 MovieClip "soni" in Frame 103
onClipEvent (load) {
function rebota(pot) {
this.estado = "saltando";
this.gravedad = 1;
this.potencia = -pot;
this.gotoAndStop(5);
}
function reset() {
if (this.estado != "muerto") {
if (this.burbu == 0) {
this.swapDepths(-16313);
_root.vidas = _root.vidas - 1;
this.gravedad = 2;
this.potencia = this.saltemos;
this.estado = "muerto";
this.gotoAndStop(7);
this.tocandosuelo = 0;
this._y = this._y - 10;
misonidra = new Sound();
misonidra.attachSound("sonic_dead");
misonidra.start();
} else {
this.burbu = 0;
this.esfera1._alpha = 0;
this.rebota("15");
}
}
}
function recalculate() {
if (this.lado == "izquierda") {
this.x_temporal = this._x + (Math.cos((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase));
this.y_temporal = this._y + (Math.sin((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
} else {
this.x_temporal = this._x + (Math.cos((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase));
this.y_temporal = this._y + (Math.sin((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
}
}
this.gira = 0;
suena = 0;
this.imposible = "ninguno";
this.vel = 0;
this.estado = "normal";
this.lado = "derecha";
this.burbu = 0;
this.potencia = 0;
this.cuentador = 0;
this.bolandosuelo = 0;
this.desfase = 0;
this.maxgiro = 10;
this.desfassealtura = 1;
this.rotacion = 2;
this.atacando = 0;
this.tocandosuelo = 0;
this.gravedad = 1;
this.caida = 1;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.swapDepths(_root.getNextHighestDepth());
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this._name == "sonic") {
recalculate();
this.tocandosuelo = 0;
if (_root.mundo.hitTest(this.x_temporal2, this.y_temporal2, true)) {
this.tocandosuelo = 1;
}
if (this.estado == "esperando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(40) && (Key.isDown(32))) {
this.estado = "bolasuelo";
this.gotoAndStop(8);
}
} else if (this.estado == "normal") {
this.cuentador++;
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.cuentador >= 36) {
this.cuentador = 0;
this.estado = "esperando";
this.gotoAndStop(1);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(40) && (Key.isDown(32))) {
this.estado = "bolasuelo";
this.gotoAndStop(8);
}
} else if (this.estado == "andando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(40)) {
this.estado = "rodando";
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > this.corte) {
this.estado == "corriendo";
this.gotoAndStop(4);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && Key.isDown(39))) {
this.estado = "frenando";
this.gotoAndStop(6);
}
} else if (this.estado == "corriendo") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Key.isDown(40)) {
this.estado = "rodando";
this.gotoAndStop(5);
} else if (Math.abs(this.vel) < this.corte) {
this.estado == "andando";
this.gotoAndStop(3);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && Key.isDown(39))) {
this.estado = "frenando";
this.gotoAndStop(6);
}
} else if (this.estado == "saltando") {
this._rotation = 0;
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
}
} else if (this.estado == "frenando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
} else if (this.estado == "muerto") {
} else if (this.estado == "bolasuelo") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Key.isDown(40) && Key.isDown(32)) {
this.bolandosuelo = this.bolandosuelo + this.aceleracion;
} else if (this.lado == "derecha") {
this.vel = this.bolandosuelo;
this.estado = "rodando";
this.gotoAndStop(5);
} else {
this.vel = -this.bolandosuelo;
this.estado = "rodando";
this.gotoAndStop(5);
}
if (this.bolandosuelo >= 100) {
this.bolandosuelo = 100;
}
} else if (this.estado == "rodando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
}
if (this.estado == "esperando") {
this.atacando = 0;
} else if (this.estado == "normal") {
this.atacando = 0;
} else if (this.estado == "andando") {
this.atacando = 0;
} else if (this.estado == "corriendo") {
this.atacando = 0;
} else if (this.estado == "saltando") {
this.atacando = 1;
} else if (this.estado == "muerto") {
this.atacando = 0;
} else if (this.estado == "bolasuelo") {
this.atacando = 1;
} else if (this.estado == "rodando") {
this.atacando = 1;
}
if (Key.isDown(37)) {
if (this.vel > (-this.maxvel)) {
this.vel = this.vel - this.aceleracion;
}
} else if (Key.isDown(39)) {
if (this.vel < this.maxvel) {
this.vel = this.vel + this.aceleracion;
}
} else if (this.vel > 0) {
this.vel = this.vel - this.rozamiento;
} else if (this.vel < 0) {
this.vel = this.vel + this.rozamiento;
}
if (this.potencia > 30) {
this.potencia = 30;
}
if ((this.vel < 0) && (this.lado == "derecha")) {
this._xscale = -100;
this._x = this._x + (this._width / 2);
this.lado = "izquierda";
}
if ((this.vel > 0) && (this.lado == "izquierda")) {
this._xscale = 100;
this._x = this._x - (this._width / 2);
this.lado = "derecha";
}
if (this.tocandosuelo == 0) {
this._y = this._y + this.potencia;
this.potencia = this.potencia + this.gravedad;
} else {
this.potencia = 0;
}
recalculate();
if (_root.mundo.hitTest(this.x_temporal3, this.y_temporal3, true)) {
while (_root.mundo.hitTest(this.x_temporal3, this.y_temporal3, true)) {
this._y = this._y + 1;
recalculate();
}
this._y = this._y - 1;
this.potencia = this.potencia * -1;
recalculate();
}
recalculate();
if (_root.mundo.hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo.hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
this.x_temporal = this.x_temporal + this.vel;
this.imposible = 0;
if (_root.mundo.hitTest(this.x_temporal, this.y_temporal, true)) {
this.imposible = 1;
}
if (this.imposible == 0) {
if (this.tocandosuelo == 0) {
if (this.lado == "izquierda") {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
} else {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
}
} else {
this._x = this._x + this.vel;
}
}
if (((this._x > 300) && (this.lado == "derecha")) || ((this._x < 200) && (this.lado == "izquierda"))) {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
_root.movimiento = Math.cos((this._rotation * Math.PI) / 180) * this.vel;
} else {
_root.movimiento = 0;
}
if (this._y > 600) {
this.reset();
}
this.y = this._y;
this.x = this._x;
this.height = this._height;
this.width = this._width;
this.rotation = this._rotation;
}
}
Instance of Symbol 1009 MovieClip "decoracion" in Frame 103
onClipEvent (enterFrame) {
this._x = this._x - _root.movimiento;
}
Instance of Symbol 1068 MovieClip "mundo" in Frame 103
onClipEvent (enterFrame) {
this._x = this._x - _root.movimiento;
}
Frame 104
_root.cargandillo._alpha = 100;
if (_root.vidas < 0) {
gotoAndPlay ("gameover");
} else {
stop();
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
_root.profundidad = 0;
_root.profundidad = 0;
_root.frame = 104;
_root.siguiente = 105;
_root.temp = 100;
_root.movimiento = 0;
_root.gravedad = 1;
_root.balas = 1;
_root.nivel = 2;
final = "5900:5";
var mapa = new Array();
var gusanos = new Array();
var monedas = new Array();
var muelles = new Array();
var totems = new Array();
var flors = new Array();
var gordos = new Array();
var arbols = new Array();
var arbolillos = new Array();
var pinchos = new Array();
var ranas = new Array();
var cocodrilos = new Array();
var rokalokas = new Array();
var batmans = new Array();
var calabazas = new Array();
var cangrejos = new Array();
var peras = new Array();
var stars = new Array();
var loops = new Array();
var mariquitas = new Array();
var lifes = new Array();
var burbujas = new Array();
var avispas = new Array();
var enefloras = new Array();
var eneflors = new Array();
var magnetos = new Array();
var pendulos = new Array();
mapa.push("512:127:-50017:453.25:1");
mapa.push("512:127:-50017:453.25:2");
mapa.push("512:127:-50017:453.25:3");
mapa.push("512:127:-50017:453.25:4");
mapa.push("512:127:-50017:453.25:5");
mapa.push("512:127:-50017:453.25:6");
mapa.push("512:127:-50017:453.25:7");
mapa.push("512:127:-50017:453.25:8");
mapa.push("512:127:-50017:453.25:9");
mapa.push("512:127:-50017:453.25:10");
mapa.push("512:127:-50017:453.25:11");
mapa.push("512:127:-50017:453.25:12");
mapa.push("512:127:-50017:453.25:13");
mapa.push("512:127:-50017:453.25:14");
mapa.push("512:127:-50017:453.25:15");
mapa.push("512:127:-50017:453.25:16");
mapa.push("512:127:-50017:453.25:17");
mapa.push("512:127:-50017:453.25:18");
mapa.push("512:127:-50017:453.25:19");
mapa.push("512:127:-50017:453.25:20");
mapa.push("512:127:-50017:453.25:21");
mapa.push("512:127:-50017:453.25:22");
mapa.push("512:127:-50017:453.25:23");
mariquitas.push("-50017.25:206.25");
mariquitas.push("-50017.25:206.25");
mapa.push("256:256:252.75:666.25:4");
mapa.push("256:256:502.75:666.25:4");
mapa.push("256:256:752.75:666.25:4");
mapa.push("256:256:997.75:666.25:4");
mapa.push("256:256:1247.75:666.25:4");
monedas.push("17:394");
monedas.push("42:394");
monedas.push("67:394");
monedas.push("92:394");
monedas.push("117:394");
monedas.push("142:394");
monedas.push("167:394");
monedas.push("192:394");
monedas.push("217:394");
monedas.push("242:394");
monedas.push("267:394");
monedas.push("292:394");
monedas.push("317:394");
monedas.push("342:394");
monedas.push("367:394");
monedas.push("392:394");
monedas.push("417:394");
monedas.push("442:394");
monedas.push("467:394");
monedas.push("492:394");
monedas.push("517:394");
monedas.push("542:394");
monedas.push("567:394");
monedas.push("592:394");
monedas.push("617:394");
monedas.push("642:394");
monedas.push("667:394");
monedas.push("692:394");
monedas.push("717:394");
monedas.push("742:394");
monedas.push("767:394");
monedas.push("792:394");
monedas.push("817:394");
monedas.push("842:394");
monedas.push("867:394");
monedas.push("892:394");
monedas.push("917:394");
monedas.push("942:394");
monedas.push("967:394");
monedas.push("992:394");
monedas.push("1017:394");
monedas.push("1042:394");
monedas.push("1067:394");
monedas.push("1092:394");
monedas.push("1117:394");
monedas.push("1142:394");
monedas.push("1167:394");
monedas.push("1192:394");
monedas.push("1217:394");
monedas.push("1242:394");
mapa.push("256:256:1502.75:591.25:4");
mapa.push("256:256:1757.75:481.25:4");
mapa.push("256:256:2007.75:661.25:4");
mapa.push("256:256:2262.75:661.25:4");
mapa.push("256:256:2512.75:661.25:4");
mapa.push("256:256:2767.75:611.25:4");
mapa.push("256:256:3017.75:526.25:4");
monedas.push("2777:244");
monedas.push("2802:244");
monedas.push("2827:244");
monedas.push("2852:244");
monedas.push("2877:244");
monedas.push("2902:244");
monedas.push("2927:244");
monedas.push("2952:244");
monedas.push("2977:244");
monedas.push("3002:244");
mapa.push("256:256:3272.75:481.25:4");
mapa.push("256:256:3527.75:481.25:4");
mapa.push("256:256:3777.75:481.25:4");
mapa.push("256:256:4032.75:481.25:4");
mapa.push("256:256:4287.75:531.25:4");
mapa.push("256:256:4542.75:591.25:4");
mapa.push("256:256:4792.75:651.25:4");
mapa.push("256:256:5042.75:651.25:4");
mapa.push("256:256:5292.75:651.25:4");
mapa.push("256:256:5542.75:651.25:4");
mapa.push("256:256:5792.75:651.25:4");
mapa.push("256:256:6047.75:651.25:4");
monedas.push("5052:379");
monedas.push("5077:379");
monedas.push("5102:379");
monedas.push("5127:379");
monedas.push("5152:379");
monedas.push("5177:379");
monedas.push("5202:379");
monedas.push("5227:379");
monedas.push("5252:379");
monedas.push("5277:379");
monedas.push("5302:379");
monedas.push("5327:379");
monedas.push("5352:379");
monedas.push("5377:379");
monedas.push("5402:379");
monedas.push("5427:379");
monedas.push("5452:379");
monedas.push("5477:379");
monedas.push("5502:379");
monedas.push("5527:379");
monedas.push("5552:379");
monedas.push("5577:379");
monedas.push("5602:379");
monedas.push("5627:379");
monedas.push("5652:379");
monedas.push("5677:379");
monedas.push("5702:379");
monedas.push("5727:379");
monedas.push("5752:379");
monedas.push("5777:379");
monedas.push("5802:379");
monedas.push("5827:379");
monedas.push("5852:379");
monedas.push("5877:379");
monedas.push("5902:379");
monedas.push("5927:379");
monedas.push("5952:379");
monedas.push("5977:379");
monedas.push("6002:379");
monedas.push("6027:379");
mapa.push("64:32:1961.5:241:5");
mapa.push("64:32:2161.5:241:5");
mapa.push("64:32:2346.5:241:5");
mapa.push("64:32:2516.5:241:5");
pinchos.push("1773.25:396.5");
pinchos.push("1803.25:396.5");
pinchos.push("1833.25:396.5");
pinchos.push("1863.25:396.5");
pinchos.push("1893.25:396.5");
pinchos.push("1923.25:396.5");
pinchos.push("1953.25:396.5");
pinchos.push("2303.25:391.5");
pinchos.push("2333.25:391.5");
pinchos.push("2363.25:391.5");
pinchos.push("2393.25:391.5");
pinchos.push("2423.25:391.5");
pinchos.push("2453.25:391.5");
pinchos.push("2478.25:391.5");
pinchos.push("2498.25:391.5");
monedas.push("1927:159");
monedas.push("1952:159");
monedas.push("1977:159");
monedas.push("2002:159");
monedas.push("2027:159");
monedas.push("2052:159");
monedas.push("2077:159");
monedas.push("2102:159");
monedas.push("2127:159");
monedas.push("2152:159");
monedas.push("2287:159");
monedas.push("2312:159");
monedas.push("2337:159");
monedas.push("2362:159");
monedas.push("2387:159");
monedas.push("2412:159");
monedas.push("2437:159");
monedas.push("2462:159");
monedas.push("2487:159");
monedas.push("2512:159");
mariquitas.push("3344.5:195.75");
mariquitas.push("3914.5:190.75");
mariquitas.push("4944.5:370.75");
pinchos.push("2783.25:261.5");
pinchos.push("4303.25:321.5");
pinchos.push("4333.25:321.5");
mariquitas.push("1129.5:390.75");
mariquitas.push("1709.5:205.75");
monedas.push("2027:389");
monedas.push("2052:389");
monedas.push("2077:389");
monedas.push("2102:389");
monedas.push("2127:389");
monedas.push("2152:389");
monedas.push("2177:389");
monedas.push("2202:389");
monedas.push("2227:389");
monedas.push("2252:389");
mapa.push("72:120:496.25:413:15");
mapa.push("72:120:2186.25:408:15");
mapa.push("72:120:3546.25:228:15");
mapa.push("72:120:4781.25:393:15");
mapa.push("64:131:1396.25:336:7");
mapa.push("64:131:3226.25:231:7");
mapa.push("64:131:4256.25:281:7");
mapa.push("64:131:881.25:411:7");
split_map();
if (_root.person == "sonic") {
_root.soni._name = "sonic";
} else if (_root.person == "tails") {
_root.tails._name = "sonic";
} else if (_root.person == "knuckles") {
_root.knuckles._name = "sonic";
} else if (_root.person == "amy") {
_root.amy._name = "sonic";
} else if (_root.person == "shadow") {
_root.shadow._name = "sonic";
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
CuentaAtras = Math.round(getTimer() / 1000) + temp;
_root.onEnterFrame = function () {
_root.cargandillo._alpha = 0;
Tiempo = Math.round(getTimer() / 1000);
Restante = CuentaAtras - Tiempo;
if (Restante < 0) {
_root.sonic.reset();
}
};
stop();
Instance of Symbol 1105 MovieClip "loop1" in Frame 104
onClipEvent (load) {
this.estado = "esperando";
}
onClipEvent (enterFrame) {
if ((this.entrada.hitTest(_root.sonic.pluton) && (_root.sonic.estado == "corriendo")) && (_root.sonic.lado == "derecha")) {
this.estado = "dentro";
this.lado = "izkierda";
_root.sonic._visible = 0;
_root.sonic.gira = 1;
_root.movimiento = 150;
_root.sonic._x = 100;
}
if ((this.salida.hitTest(_root.sonic.pluton) && (_root.sonic.estado == "corriendo")) && (_root.sonic.lado == "izquierda")) {
this.estado = "dentro";
this.lado = "derecha";
_root.sonic._visible = 0;
_root.sonic.gira = 1;
_root.movimiento = -200;
_root.sonic._x = 300;
}
this._x = this._x - _root.movimiento;
}
Instance of Symbol 1105 MovieClip in Frame 104
onClipEvent (load) {
this.estado = "esperando";
}
onClipEvent (enterFrame) {
if (this.estado == "fuera") {
this.stop();
}
if ((this.entrada.hitTest(_root.sonic.pluton) && (_root.sonic.estado == "corriendo")) && (_root.sonic.lado == "derecha")) {
this.estado = "dentro";
this.play();
_root.sonic._visible = 0;
_root.sonic.gira = 1;
}
this._x = this._x - _root.movimiento;
}
Instance of Symbol 214 MovieClip "knuckles" in Frame 104
onClipEvent (load) {
function rebota(pot) {
this.estado = "saltando";
this.gravedad = 2;
this.potencia = -pot;
this.gotoAndStop(5);
}
function reset() {
if (this.estado != "muerto") {
if (this.burbu == 0) {
this.swapDepths(-16313);
_root.vidas = _root.vidas - 1;
this.gravedad = 2;
this.potencia = this.saltemos;
this.estado = "muerto";
this.gotoAndStop(7);
this.tocandosuelo = 0;
this._y = this._y - 10;
misonidra = new Sound();
misonidra.attachSound("sonic_dead");
misonidra.start();
} else {
this.burbu = 0;
this.esfera1._alpha = 0;
this.rebota("20");
}
}
}
function recalculate() {
if (this.lado == "izquierda") {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = (this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.cos(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal3 = (this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.sin(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
} else {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
}
}
this.maxgiro = 10;
this.gira = 0;
suena = 0;
this.imposible = "ninguno";
this.vel = 0;
this.estado = "normal";
this.lado = "derecha";
this.gravedad = 2;
this.burbu = 0;
this.potencia = 0;
this.caida = 2;
this.cuentador = 0;
this.bolandosuelo = 0;
this.corte = 10;
this.tocandosuelo = 0;
this.aceleracion = 5;
this.rozamiento = 5;
this.maxvel = 30;
this.desfase = 0;
this.desfassealtura = 1;
this.rotacion = 2;
this.atacando = 0;
this.saltemos = -20;
this.gravedad = 1;
this.caida = 1;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.swapDepths(_root.getNextHighestDepth());
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this._name == "sonic") {
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
recalculate();
this.tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this.tocandosuelo = 1;
}
i++;
}
if (this.estado == "esperando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "normal") {
this.cuentador++;
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.cuentador >= 36) {
this.cuentador = 0;
this.estado = "esperando";
this.gotoAndStop(1);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "andando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(40)) {
this.estado = "rodando";
this.gotoAndStop(5);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && (Key.isDown(39)))) {
this.estado = "frenando";
this.gotoAndStop(6);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "saltando") {
this._rotation = 0;
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
}
} else if (this.estado == "frenando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "muerto") {
} else if (this.estado == "pegando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
}
} else if (this.estado == "rodando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
}
if (this.estado == "esperando") {
this.atacando = 0;
} else if (this.estado == "normal") {
this.atacando = 0;
} else if (this.estado == "andando") {
this.atacando = 0;
} else if (this.estado == "corriendo") {
this.atacando = 0;
} else if (this.estado == "saltando") {
this.atacando = 1;
} else if (this.estado == "muerto") {
this.atacando = 0;
} else if (this.estado == "pegando") {
this.atacando = 1;
} else if (this.estado == "rodando") {
this.atacando = 1;
}
if (Key.isDown(37)) {
if (this.vel > (-this.maxvel)) {
this.vel = this.vel - this.aceleracion;
}
} else if (Key.isDown(39)) {
if (this.vel < this.maxvel) {
this.vel = this.vel + this.aceleracion;
}
} else if (this.vel > 0) {
this.vel = this.vel - this.rozamiento;
} else if (this.vel < 0) {
this.vel = this.vel + this.rozamiento;
}
if (this.potencia > 30) {
this.potencia = 30;
}
if ((this.vel < 0) && (this.lado == "derecha")) {
this._xscale = -100;
this._x = this._x + (this._width / 2);
this.lado = "izquierda";
}
if ((this.vel > 0) && (this.lado == "izquierda")) {
this._xscale = 100;
this._x = this._x - (this._width / 2);
this.lado = "derecha";
}
if (this.tocandosuelo == 0) {
this._y = this._y + this.potencia;
this.potencia = this.potencia + this.gravedad;
} else {
this.potencia = 0;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
this._y = this._y + 1;
recalculate();
}
this._y = this._y - 1;
this.potencia = this.potencia * -1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
this.x_temporal = this.x_temporal + this.vel;
this.imposible = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal, this.y_temporal, true)) {
this.imposible = 1;
}
i++;
}
if (this.imposible == 0) {
if (this.tocandosuelo == 0) {
if (this.lado == "izquierda") {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
} else {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
}
} else {
this._x = this._x + this.vel;
}
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
if (((this._x > 300) && (this.lado == "derecha")) || ((this._x < 200) && (this.lado == "izquierda"))) {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
_root.movimiento = Math.cos((this._rotation * Math.PI) / 180) * this.vel;
} else {
_root.movimiento = 0;
}
if (this._y > 600) {
this.reset();
}
this.y = this._y;
this.x = this._x;
this.height = this._height;
this.width = this._width;
this.rotation = this._rotation;
_root.bola1._x = this.x_temporal;
_root.bola1._y = this.y_temporal;
_root.bola2._x = this.x_temporal2;
_root.bola2._y = this.y_temporal2;
_root.bola3._x = this.x_temporal3;
_root.bola3._y = this.y_temporal3;
_root.bola4._x = this.x_temporal4;
_root.bola4._y = this.y_temporal4;
_root.bola5._x = this.x_temporal5;
_root.bola5._y = this.y_temporal5;
}
}
Instance of Symbol 312 MovieClip "tails" in Frame 104
onClipEvent (load) {
function rebota(pot) {
this.estado = "saltando";
this.gravedad = 2;
this.potencia = -pot;
this.gotoAndStop(5);
}
function reset() {
if (this.estado != "muerto") {
if (this.burbu == 0) {
this.swapDepths(-16313);
_root.vidas = _root.vidas - 1;
this.gravedad = 2;
this.potencia = this.saltemos;
this.estado = "muerto";
this.gotoAndStop(7);
this.tocandosuelo = 0;
this._y = this._y - 10;
misonidra = new Sound();
misonidra.attachSound("sonic_dead");
misonidra.start();
} else {
this.burbu = 0;
this.esfera1._alpha = 0;
this.rebota("16");
}
}
}
function recalculate() {
if (this.lado == "izquierda") {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = (this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.cos(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal3 = (this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.sin(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
} else {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
}
}
this.maxgiro = 10;
this.gira = 0;
suena = 0;
this.imposible = "ninguno";
this.vel = 0;
this.estado = "normal";
this.lado = "derecha";
this.gravedad = 2;
this.burbu = 0;
this.potencia = 0;
this.caida = 2;
this.cuentador = 0;
this.bolandosuelo = 0;
this.corte = 10;
this.tocandosuelo = 0;
this.aceleracion = 5;
this.rozamiento = 5;
this.maxvel = 20;
this.desfase = 0;
this.desfassealtura = 1;
this.rotacion = 2;
this.atacando = 0;
this.saltemos = -30;
this.gravedad = 1;
this.caida = 1;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.swapDepths(_root.getNextHighestDepth());
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this._name == "sonic") {
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
recalculate();
this.tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this.tocandosuelo = 1;
}
i++;
}
if (this.estado == "esperando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "normal") {
this.cuentador++;
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.cuentador >= 36) {
this.cuentador = 0;
this.estado = "esperando";
this.gotoAndStop(1);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "andando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(40)) {
this.estado = "rodando";
this.gotoAndStop(5);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && (Key.isDown(39)))) {
this.estado = "frenando";
this.gotoAndStop(6);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "saltando") {
this._rotation = 0;
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (this.potencia > 0) {
this.estado = "volando";
this.gotoAndStop(4);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "volando") {
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "frenando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "muerto") {
} else if (this.estado == "pegando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
}
} else if (this.estado == "rodando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
}
if (this.estado == "esperando") {
this.atacando = 0;
} else if (this.estado == "normal") {
this.atacando = 0;
} else if (this.estado == "andando") {
this.atacando = 0;
} else if (this.estado == "corriendo") {
this.atacando = 0;
} else if (this.estado == "saltando") {
this.atacando = 1;
} else if (this.estado == "muerto") {
this.atacando = 0;
} else if (this.estado == "pegando") {
this.atacando = 1;
} else if (this.estado == "rodando") {
this.atacando = 1;
}
if (Key.isDown(37)) {
if (this.vel > (-this.maxvel)) {
this.vel = this.vel - this.aceleracion;
}
} else if (Key.isDown(39)) {
if (this.vel < this.maxvel) {
this.vel = this.vel + this.aceleracion;
}
} else if (this.vel > 0) {
this.vel = this.vel - this.rozamiento;
} else if (this.vel < 0) {
this.vel = this.vel + this.rozamiento;
}
if (this.potencia > 30) {
this.potencia = 30;
}
if ((this.vel < 0) && (this.lado == "derecha")) {
this._xscale = -100;
this._x = this._x + (this._width / 2);
this.lado = "izquierda";
}
if ((this.vel > 0) && (this.lado == "izquierda")) {
this._xscale = 100;
this._x = this._x - (this._width / 2);
this.lado = "derecha";
}
if (this.tocandosuelo == 0) {
if (this.estado == "volando") {
this._y = this._y + this.gravedad;
} else {
this._y = this._y + this.potencia;
this.potencia = this.potencia + this.gravedad;
}
} else {
this.potencia = 0;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
this._y = this._y + 1;
recalculate();
}
this._y = this._y - 1;
this.potencia = this.potencia * -1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
this.x_temporal = this.x_temporal + this.vel;
this.imposible = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal, this.y_temporal, true)) {
this.imposible = 1;
}
i++;
}
if (this.imposible == 0) {
if (this.tocandosuelo == 0) {
if (this.lado == "izquierda") {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
} else {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
}
} else {
this._x = this._x + this.vel;
}
}
if (((this._x > 300) && (this.lado == "derecha")) || ((this._x < 200) && (this.lado == "izquierda"))) {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
_root.movimiento = Math.cos((this._rotation * Math.PI) / 180) * this.vel;
} else {
_root.movimiento = 0;
}
if (this._y > 600) {
this.reset();
}
this.y = this._y;
this.x = this._x;
this.height = this._height;
this.width = this._width;
this.rotation = this._rotation;
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
_root.bola1._x = this.x_temporal;
_root.bola1._y = this.y_temporal;
_root.bola2._x = this.x_temporal2;
_root.bola2._y = this.y_temporal2;
_root.bola3._x = this.x_temporal3;
_root.bola3._y = this.y_temporal3;
_root.bola4._x = this.x_temporal4;
_root.bola4._y = this.y_temporal4;
_root.bola5._x = this.x_temporal5;
_root.bola5._y = this.y_temporal5;
}
}
Instance of Symbol 465 MovieClip "shadow" in Frame 104
onClipEvent (load) {
function rebota(pot) {
this.estado = "saltando";
this.gravedad = 2;
this.potencia = -pot;
this.gotoAndStop(5);
}
function reset() {
if (this.estado != "muerto") {
if (this.burbu == 0) {
this.swapDepths(-16313);
_root.vidas = _root.vidas - 1;
this.gravedad = 2;
this.potencia = this.saltemos;
this.estado = "muerto";
this.gotoAndStop(7);
this.tocandosuelo = 0;
this._y = this._y - 10;
misonidra = new Sound();
misonidra.attachSound("sonic_dead");
misonidra.start();
} else {
this.burbu = 0;
this.esfera1._alpha = 0;
this.rebota("16");
}
}
}
function recalculate() {
if (this.lado == "izquierda") {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = (this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.cos(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal3 = (this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.sin(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
} else {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
}
}
this.maxgiro = 10;
this.gira = 0;
suena = 0;
this.imposible = "ninguno";
this.vel = 0;
this.estado = "normal";
this.lado = "derecha";
this.gravedad = 2;
this.burbu = 0;
this.potencia = 0;
this.caida = 2;
this.cuentador = 0;
this.bolandosuelo = 0;
this.corte = 10;
this.tocandosuelo = 0;
this.aceleracion = 5;
this.rozamiento = 5;
this.maxvel = 20;
this.desfase = 0;
this.desfassealtura = 1;
this.rotacion = 2;
this.atacando = 0;
this.saltemos = -25;
this.gravedad = 1;
this.caida = 1;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.swapDepths(_root.getNextHighestDepth());
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this._name == "sonic") {
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
recalculate();
this.tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this.tocandosuelo = 1;
}
i++;
}
if (this.estado == "esperando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "normal") {
this.cuentador++;
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.cuentador >= 36) {
this.cuentador = 0;
this.estado = "esperando";
this.gotoAndStop(1);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "andando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && (Key.isDown(39)))) {
this.estado = "frenando";
this.gotoAndStop(6);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "bajando") {
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegandoaire";
this.gotoAndStop(9);
}
} else if (this.estado == "saltando") {
this._rotation = 0;
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (this.potencia > 0) {
this.estado = "bajando";
this.gotoAndStop(4);
} else if (Key.isDown(32)) {
this.estado = "pegandoaire";
this.gotoAndStop(9);
}
} else if (this.estado == "frenando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "muerto") {
} else if (this.estado == "pegando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
}
} else if (this.estado == "rodando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
}
if (this.estado == "esperando") {
this.atacando = 0;
} else if (this.estado == "normal") {
this.atacando = 0;
} else if (this.estado == "andando") {
this.atacando = 0;
} else if (this.estado == "corriendo") {
this.atacando = 0;
} else if (this.estado == "saltando") {
this.atacando = 0;
} else if (this.estado == "bajando") {
this.atacando = 0;
} else if (this.estado == "muerto") {
this.atacando = 0;
} else if (this.estado == "pegando") {
this.atacando = 1;
} else if (this.estado == "pegandoaire") {
this.atacando = 1;
} else if (this.estado == "rodando") {
this.atacando = 1;
}
if (Key.isDown(37)) {
if (this.vel > (-this.maxvel)) {
this.vel = this.vel - this.aceleracion;
}
} else if (Key.isDown(39)) {
if (this.vel < this.maxvel) {
this.vel = this.vel + this.aceleracion;
}
} else if (this.vel > 0) {
this.vel = this.vel - this.rozamiento;
} else if (this.vel < 0) {
this.vel = this.vel + this.rozamiento;
}
if (this.potencia > 30) {
this.potencia = 30;
}
if ((this.vel < 0) && (this.lado == "derecha")) {
this._xscale = -100;
this._x = this._x + (this._width / 2);
this.lado = "izquierda";
}
if ((this.vel > 0) && (this.lado == "izquierda")) {
this._xscale = 100;
this._x = this._x - (this._width / 2);
this.lado = "derecha";
}
if (this.tocandosuelo == 0) {
this._y = this._y + this.potencia;
this.potencia = this.potencia + this.gravedad;
} else {
this.potencia = 0;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
this._y = this._y + 1;
recalculate();
}
this._y = this._y - 1;
this.potencia = this.potencia * -1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
this.x_temporal = this.x_temporal + this.vel;
this.imposible = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal, this.y_temporal, true)) {
this.imposible = 1;
}
i++;
}
if (this.imposible == 0) {
if (this.tocandosuelo == 0) {
if (this.lado == "izquierda") {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
} else {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
}
} else {
this._x = this._x + this.vel;
}
}
if (((this._x > 300) && (this.lado == "derecha")) || ((this._x < 200) && (this.lado == "izquierda"))) {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
_root.movimiento = Math.cos((this._rotation * Math.PI) / 180) * this.vel;
} else {
_root.movimiento = 0;
}
if (this._y > 600) {
this.reset();
}
this.y = this._y;
this.x = this._x;
this.height = this._height;
this.width = this._width;
this.rotation = this._rotation;
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
_root.bola1._x = this.x_temporal;
_root.bola1._y = this.y_temporal;
_root.bola2._x = this.x_temporal2;
_root.bola2._y = this.y_temporal2;
_root.bola3._x = this.x_temporal3;
_root.bola3._y = this.y_temporal3;
_root.bola4._x = this.x_temporal4;
_root.bola4._y = this.y_temporal4;
_root.bola5._x = this.x_temporal5;
_root.bola5._y = this.y_temporal5;
}
}
Instance of Symbol 588 MovieClip "amy" in Frame 104
onClipEvent (load) {
function rebota(pot) {
this.estado = "saltando";
this.gravedad = 2;
this.potencia = -pot;
this.gotoAndStop(5);
}
function reset() {
if (this.estado != "muerto") {
if (this.burbu == 0) {
this.swapDepths(-16313);
_root.vidas = _root.vidas - 1;
this.gravedad = 2;
this.potencia = this.saltemos;
this.estado = "muerto";
this.gotoAndStop(7);
this.tocandosuelo = 0;
this._y = this._y - 10;
misonidra = new Sound();
misonidra.attachSound("sonic_dead");
misonidra.start();
} else {
this.burbu = 0;
this.esfera1._alpha = 0;
this.rebota("16");
}
}
}
function recalculate() {
if (this.lado == "izquierda") {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * (((-this.xcorrect) - Math.abs(this.vel)) - this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = (this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.cos(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal3 = (this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect)) + (Math.sin(((this._rotation - 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
} else {
this.x_temporal = (this._x + (Math.cos((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.y_temporal = (this._y + (Math.sin((this._rotation * Math.PI) / 180) * ((this.xcorrect + Math.abs(this.vel)) + this.desfase))) + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * (this.xcorrect / 2));
this.x_temporal2 = this._x + (Math.cos(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal2 = this._y + (Math.sin(((this._rotation + 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal3 = this._x + (Math.cos(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.y_temporal3 = this._y + (Math.sin(((this._rotation - 90) * Math.PI) / 180) * this.ycorrect);
this.x_temporal4 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.y_temporal4 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * this.xcorrect);
this.x_temporal5 = this.x_temporal2 + (Math.cos(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
this.y_temporal5 = this.y_temporal2 + (Math.sin(((this._rotation + 180) * Math.PI) / 180) * (-this.xcorrect));
}
}
this.gira = 0;
suena = 0;
this.imposible = "ninguno";
this.vel = 0;
this.estado = "normal";
this.lado = "derecha";
this.gravedad = 2;
this.burbu = 0;
this.potencia = 0;
this.caida = 2;
this.cuentador = 0;
this.bolandosuelo = 0;
this.corte = 10;
this.tocandosuelo = 0;
this.maxvel = 20;
this.desfase = 0;
this.desfassealtura = 1;
this.rotacion = 2;
this.atacando = 0;
this.maxgiro = 10;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.gravedad = 1;
this.caida = 1;
this.corte = 8;
this.aceleracion = 2;
this.rozamiento = 2;
this.maxvel = 16;
this.saltemos = -16;
this.swapDepths(_root.getNextHighestDepth());
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this._name == "sonic") {
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
recalculate();
this.tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this.tocandosuelo = 1;
}
i++;
}
if (this.estado == "esperando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "normal") {
this.cuentador++;
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.cuentador >= 36) {
this.cuentador = 0;
this.estado = "esperando";
this.gotoAndStop(1);
} else if (Math.abs(this.vel) > 0) {
this.estado = "andando";
this.gotoAndStop(3);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "andando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (((this.lado == "derecha") && (Key.isDown(37))) || ((this.lado == "izquierda") && (Key.isDown(39)))) {
this.estado = "frenando";
this.gotoAndStop(6);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "bajando") {
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegandoaire";
this.gotoAndStop(9);
}
} else if (this.estado == "saltando") {
this._rotation = 0;
if (this.tocandosuelo == 1) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (this.potencia > 0) {
this.estado = "bajando";
this.gotoAndStop(4);
} else if (Key.isDown(32)) {
this.estado = "pegandoaire";
this.gotoAndStop(9);
}
} else if (this.estado == "frenando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
} else if (Key.isDown(32)) {
this.estado = "pegando";
this.gotoAndStop(8);
}
} else if (this.estado == "muerto") {
} else if (this.estado == "pegando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
}
} else if (this.estado == "rodando") {
if (Key.isDown(38) && (this.tocandosuelo == 1)) {
this.estado = "saltando";
this.tocandosuelo = 0;
this.potencia = this.saltemos;
this.gotoAndStop(5);
} else if (this.vel == 0) {
this.estado = "normal";
this.gotoAndStop(2);
}
}
if (this.estado == "esperando") {
this.atacando = 0;
} else if (this.estado == "normal") {
this.atacando = 0;
} else if (this.estado == "andando") {
this.atacando = 0;
} else if (this.estado == "corriendo") {
this.atacando = 0;
} else if (this.estado == "saltando") {
this.atacando = 0;
} else if (this.estado == "bajando") {
this.atacando = 0;
} else if (this.estado == "muerto") {
this.atacando = 0;
} else if (this.estado == "pegando") {
this.atacando = 1;
} else if (this.estado == "pegandoaire") {
this.atacando = 1;
} else if (this.estado == "rodando") {
this.atacando = 1;
}
if (Key.isDown(37)) {
if (this.vel > (-this.maxvel)) {
this.vel = this.vel - this.aceleracion;
}
} else if (Key.isDown(39)) {
if (this.vel < this.maxvel) {
this.vel = this.vel + this.aceleracion;
}
} else if (this.vel > 0) {
this.vel = this.vel - this.rozamiento;
} else if (this.vel < 0) {
this.vel = this.vel + this.rozamiento;
}
if (this.potencia > 30) {
this.potencia = 30;
}
if ((this.vel < 0) && (this.lado == "derecha")) {
this._xscale = -100;
this._x = this._x + (this._width / 2);
this.lado = "izquierda";
}
if ((this.vel > 0) && (this.lado == "izquierda")) {
this._xscale = 100;
this._x = this._x - (this._width / 2);
this.lado = "derecha";
}
if (this.tocandosuelo == 0) {
this._y = this._y + this.potencia;
this.potencia = this.potencia + this.gravedad;
} else {
this.potencia = 0;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal3, this.y_temporal3, true)) {
this._y = this._y + 1;
recalculate();
}
this._y = this._y - 1;
this.potencia = this.potencia * -1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
this.x_temporal = this.x_temporal + this.vel;
this.imposible = 0;
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal, this.y_temporal, true)) {
this.imposible = 1;
}
i++;
}
if (this.imposible == 0) {
if (this.tocandosuelo == 0) {
if (this.lado == "izquierda") {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
} else {
this._x = this._x + (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
this._y = this._y + (Math.sin((this._rotation * Math.PI) / 180) * this.vel);
}
} else {
this._x = this._x + this.vel;
}
}
if (((this._x > 300) && (this.lado == "derecha")) || ((this._x < 200) && (this.lado == "izquierda"))) {
this._x = this._x - (Math.cos((this._rotation * Math.PI) / 180) * this.vel);
_root.movimiento = Math.cos((this._rotation * Math.PI) / 180) * this.vel;
} else {
_root.movimiento = 0;
}
if (this._y > 600) {
this.reset();
}
this.y = this._y;
this.x = this._x;
this.height = this._height;
this.width = this._width;
this.rotation = this._rotation;
recalculate();
i = 1;
while (i <= _root.numplataformas) {
if (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
while (_root.mundo["plataforma2" + i].hitTest(this.x_temporal2, this.y_temporal2, true)) {
this._y = this._y - 1;
recalculate();
}
this._y = this._y + 1;
recalculate();
}
i++;
}
_root.bola1._x = this.x_temporal;
_root.bola1._y = this.y_temporal;
_root.bola2._x = this.x_temporal2;
_root.bola2._y = this.y_temporal2;
_root.bola3._x = this.x_temporal3;
_root.bola3._y = this.y_temporal3;
_root.bola4._x = this.x_temporal4;
_root.bola4._y = this.y_temporal4;
_root.bola5._x = this.x_temporal5;
_root.bola5._y = this.y_temporal5;
}
}
Instance of Symbol 826 MovieClip "plataformak" in Frame 104
onClipEvent (enterFrame) {
this._x = this._x - _root.movimiento;
}
Frame 105
_root.cargandillo._alpha = 100;
if (_root.vidas < 0) {
gotoAndPlay ("gameover");
} else {
stop();
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
_root.profundidad = 0;
_root.profundidad = 0;
_root.frame = 105;
_root.siguiente = 106;
_root.temp = 100;
_root.movimiento = 0;
_root.gravedad = 1;
_root.balas = 1;
_root.nivel = 3;
final = "5900:90";
var mapa = new Array();
var gusanos = new Array();
var monedas = new Array();
var muelles = new Array();
var totems = new Array();
var flors = new Array();
var gordos = new Array();
var arbols = new Array();
var arbolillos = new Array();
var pinchos = new Array();
var ranas = new Array();
var cocodrilos = new Array();
var rokalokas = new Array();
var batmans = new Array();
var calabazas = new Array();
var cangrejos = new Array();
var peras = new Array();
var stars = new Array();
var loops = new Array();
var mariquitas = new Array();
var lifes = new Array();
var burbujas = new Array();
var avispas = new Array();
var enefloras = new Array();
var eneflors = new Array();
var magnetos = new Array();
var pendulos = new Array();
mapa.push("512:127:-50017:453.25:1");
mapa.push("512:127:-50017:453.25:2");
mapa.push("512:127:-50017:453.25:3");
mapa.push("512:127:-50017:453.25:4");
mapa.push("512:127:-50017:453.25:5");
mapa.push("512:127:-50017:453.25:6");
mapa.push("512:127:-50017:453.25:7");
mapa.push("512:127:-50017:453.25:8");
mapa.push("512:127:-50017:453.25:9");
mapa.push("512:127:-50017:453.25:10");
mapa.push("512:127:-50017:453.25:11");
mapa.push("512:127:-50017:453.25:12");
mapa.push("512:127:-50017:453.25:13");
mapa.push("512:127:-50017:453.25:14");
mapa.push("512:127:-50017:453.25:15");
mapa.push("512:127:-50017:453.25:16");
mapa.push("512:127:-50017:453.25:17");
mapa.push("512:127:-50017:453.25:18");
mapa.push("512:127:-50017:453.25:19");
mapa.push("512:127:-50017:453.25:20");
mapa.push("512:127:-50017:453.25:21");
mapa.push("512:127:-50017:453.25:22");
mapa.push("512:127:-50017:453.25:23");
mariquitas.push("-50017.25:206.25");
mariquitas.push("-50017.25:206.25");
mapa.push("256:256:257.75:476.25:4");
mapa.push("256:256:507.75:476.25:4");
mapa.push("256:256:757.75:476.25:4");
mapa.push("256:256:1012.75:476.25:4");
mapa.push("256:256:1267.75:651.25:4");
mapa.push("256:256:1517.75:656.25:4");
mapa.push("256:256:1772.75:656.25:4");
mapa.push("256:256:2027.75:656.25:4");
mapa.push("256:256:2282.75:481.25:4");
mapa.push("256:256:2537.75:481.25:4");
mapa.push("256:256:2787.75:481.25:4");
mapa.push("256:256:3037.75:481.25:4");
mapa.push("256:256:3287.75:651.25:4");
mapa.push("256:256:3537.75:651.25:4");
mapa.push("256:256:3787.75:651.25:4");
mapa.push("256:256:4022.75:651.25:4");
mapa.push("256:256:4277.75:651.25:4");
mapa.push("256:256:4527.75:651.25:4");
mapa.push("256:256:4772.75:541.25:4");
mapa.push("256:256:5022.75:646.25:4");
mapa.push("256:256:5277.75:546.25:4");
mapa.push("256:256:5532.75:646.25:4");
mapa.push("256:256:5787.75:606.25:4");
mapa.push("256:256:6042.75:561.25:4");
mapa.push("256:256:4022.75:486.25:4");
mapa.push("96:8:1112.75:307.25:20");
mapa.push("96:75.75:1205.5:338.625:21");
mapa.push("96:8:1302.75:307.25:20");
mapa.push("96:8:1392.75:307.25:20");
mapa.push("96:8:1492.75:307.25:20");
mapa.push("96:8:1587.75:307.25:20");
mapa.push("110.75:71.5:1692.875:336.5:21");
mapa.push("96:8:1777.75:307.25:20");
mapa.push("96:8:1872.75:307.25:20");
mapa.push("96:8:1967.75:307.25:20");
mapa.push("96:8:2027.75:307.25:20");
mapa.push("64:32:1876.5:301:5");
mapa.push("96:8:3137.75:302.25:20");
mapa.push("114:69.75:3234.5:330.625:21");
mapa.push("96:8:3322.75:302.25:20");
mapa.push("96:8:3422.75:302.25:20");
mapa.push("96:8:3517.75:302.25:20");
mapa.push("107.5:72.5:3611.25:332:21");
mapa.push("96:8:3697.75:302.25:20");
mapa.push("96:8:3762.75:302.25:20");
mapa.push("64:32:3711.5:306:5");
mariquitas.push("4284.5:350.75");
mariquitas.push("2759.5:185.75");
mariquitas.push("2314.5:180.75");
mariquitas.push("724.5:185.75");
mariquitas.push("4889.5:355.75");
mapa.push("64:131:4761.25:286:7");
mapa.push("64:131:5086.25:296:7");
mapa.push("96:8:4837.75:207.25:20");
mapa.push("114:69.75:4939.5:235.625:21");
mapa.push("96:8:5022.75:207.25:20");
mapa.push("96:8:5042.75:207.25:20");
mapa.push("64:131:3841.25:241:7");
mapa.push("64:131:2526.25:226:7");
mapa.push("64:131:1441.25:396:7");
mapa.push("64:131:896.25:226:7");
mapa.push("72:120:291.25:223:15");
mapa.push("72:120:3381.25:393:15");
mapa.push("72:120:5656.25:353:15");
mapa.push("72:120:4151.25:403:15");
monedas.push("1033:373.5");
monedas.push("1053:373.5");
monedas.push("1073:373.5");
monedas.push("1093:373.5");
monedas.push("1113:373.5");
monedas.push("1133:373.5");
monedas.push("1153:373.5");
monedas.push("1173:373.5");
monedas.push("1193:373.5");
monedas.push("1213:373.5");
monedas.push("1233:373.5");
monedas.push("1253:373.5");
monedas.push("1273:373.5");
monedas.push("1293:373.5");
monedas.push("1313:373.5");
monedas.push("1333:373.5");
monedas.push("1353:373.5");
monedas.push("1373:373.5");
monedas.push("1393:373.5");
monedas.push("1413:373.5");
monedas.push("1433:373.5");
monedas.push("1453:373.5");
monedas.push("1473:373.5");
monedas.push("1493:373.5");
monedas.push("1513:373.5");
monedas.push("1533:373.5");
monedas.push("1553:373.5");
monedas.push("1573:373.5");
monedas.push("1593:373.5");
monedas.push("1613:373.5");
monedas.push("1633:373.5");
monedas.push("1653:373.5");
monedas.push("1673:373.5");
monedas.push("1693:373.5");
monedas.push("1713:373.5");
monedas.push("1733:373.5");
monedas.push("1753:373.5");
monedas.push("1773:373.5");
monedas.push("1793:373.5");
monedas.push("1813:373.5");
monedas.push("1833:373.5");
monedas.push("1853:373.5");
monedas.push("1873:373.5");
monedas.push("1893:373.5");
monedas.push("1913:373.5");
monedas.push("1933:373.5");
monedas.push("1953:373.5");
monedas.push("1973:373.5");
monedas.push("1993:373.5");
monedas.push("2013:373.5");
monedas.push("2023:373.5");
monedas.push("2418:193.5");
monedas.push("2443:193.5");
monedas.push("2468:193.5");
monedas.push("2493:193.5");
monedas.push("2528:193.5");
monedas.push("2558:193.5");
monedas.push("2588:193.5");
monedas.push("2623:193.5");
monedas.push("508:183.5");
monedas.push("543:183.5");
monedas.push("583:183.5");
monedas.push("628:183.5");
monedas.push("673:183.5");
monedas.push("718:183.5");
monedas.push("758:183.5");
monedas.push("3093:368.5");
monedas.push("3128:368.5");
monedas.push("3163:368.5");
monedas.push("3208:368.5");
monedas.push("3248:368.5");
monedas.push("3298:368.5");
monedas.push("3348:368.5");
monedas.push("3403:368.5");
monedas.push("3443:368.5");
monedas.push("3493:368.5");
monedas.push("3548:368.5");
monedas.push("3598:368.5");
monedas.push("3648:368.5");
monedas.push("4023:203.5");
monedas.push("4063:183.5");
monedas.push("4103:153.5");
monedas.push("4148:138.5");
monedas.push("4203:153.5");
monedas.push("4258:188.5");
monedas.push("4313:233.5");
monedas.push("4363:273.5");
monedas.push("4788:363.5");
monedas.push("4808:363.5");
monedas.push("4828:363.5");
monedas.push("4848:363.5");
monedas.push("4868:363.5");
monedas.push("4883:363.5");
monedas.push("4903:363.5");
monedas.push("4918:363.5");
monedas.push("4933:363.5");
monedas.push("4948:363.5");
monedas.push("4968:363.5");
monedas.push("4983:363.5");
monedas.push("5003:363.5");
monedas.push("5018:363.5");
monedas.push("5313:353.5");
monedas.push("5343:353.5");
monedas.push("5378:353.5");
monedas.push("5413:353.5");
monedas.push("5448:353.5");
monedas.push("5488:353.5");
split_map();
if (_root.person == "sonic") {
_root.soni._name = "sonic";
} else if (_root.person == "tails") {
_root.tails._name = "sonic";
} else if (_root.person == "knuckles") {
_root.knuckles._name = "sonic";
} else if (_root.person == "amy") {
_root.amy._name = "sonic";
} else if (_root.person == "shadow") {
_root.shadow._name = "sonic";
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
CuentaAtras = Math.round(getTimer() / 1000) + temp;
_root.onEnterFrame = function () {
_root.cargandillo._alpha = 0;
Tiempo = Math.round(getTimer() / 1000);
Restante = CuentaAtras - Tiempo;
if (Restante < 0) {
_root.sonic.reset();
}
};
stop();
Frame 106
_root.cargandillo._alpha = 100;
if (_root.vidas < 0) {
gotoAndPlay ("gameover");
} else {
stop();
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
_root.profundidad = 0;
_root.profundidad = 0;
_root.frame = 106;
_root.siguiente = 107;
_root.temp = 100;
_root.movimiento = 0;
_root.gravedad = 1;
_root.balas = 1;
_root.nivel = 4;
final = "5900:50";
var mapa = new Array();
var gusanos = new Array();
var monedas = new Array();
var muelles = new Array();
var totems = new Array();
var flors = new Array();
var gordos = new Array();
var arbols = new Array();
var arbolillos = new Array();
var pinchos = new Array();
var ranas = new Array();
var cocodrilos = new Array();
var rokalokas = new Array();
var batmans = new Array();
var calabazas = new Array();
var cangrejos = new Array();
var peras = new Array();
var stars = new Array();
var loops = new Array();
var mariquitas = new Array();
var lifes = new Array();
var burbujas = new Array();
var avispas = new Array();
var enefloras = new Array();
var eneflors = new Array();
var magnetos = new Array();
var pendulos = new Array();
mapa.push("512:127:-50017:453.25:1");
mapa.push("512:127:-50017:453.25:2");
mapa.push("512:127:-50017:453.25:3");
mapa.push("512:127:-50017:453.25:4");
mapa.push("512:127:-50017:453.25:5");
mapa.push("512:127:-50017:453.25:6");
mapa.push("512:127:-50017:453.25:7");
mapa.push("512:127:-50017:453.25:8");
mapa.push("512:127:-50017:453.25:9");
mapa.push("512:127:-50017:453.25:10");
mapa.push("512:127:-50017:453.25:11");
mapa.push("512:127:-50017:453.25:12");
mapa.push("512:127:-50017:453.25:13");
mapa.push("512:127:-50017:453.25:14");
mapa.push("512:127:-50017:453.25:15");
mapa.push("512:127:-50017:453.25:16");
mapa.push("512:127:-50017:453.25:17");
mapa.push("512:127:-50017:453.25:18");
mapa.push("512:127:-50017:453.25:19");
mapa.push("512:127:-50017:453.25:20");
mapa.push("512:127:-50017:453.25:21");
mapa.push("512:127:-50017:453.25:22");
mapa.push("512:127:-50017:453.25:23");
mariquitas.push("-50017.25:206.25");
mariquitas.push("-50017.25:206.25");
mapa.push("256:256:2395:-1018.5:4");
mapa.push("256:256:260:581.5:4");
mapa.push("256:256:515:526.5:4");
mapa.push("256:256:770:451.5:4");
mapa.push("256:256:1025:481.5:4");
mapa.push("256:256:1280:661.5:4");
mapa.push("256:256:1530:661.5:4");
mapa.push("256:256:1775:661.5:4");
mapa.push("256:256:2025:661.5:4");
mapa.push("256:256:2270:661.5:4");
mapa.push("256:256:2515:661.5:4");
mapa.push("256:256:2765:661.5:4");
mapa.push("256:256:3015:661.5:4");
mapa.push("256:256:3270:481.5:4");
mapa.push("96:8:1117.75:267.25:20");
mapa.push("96:8:1212.75:267.25:20");
mapa.push("96:8:1309:267.25:20");
mapa.push("96:8:1404:267.25:20");
mapa.push("96:8:1499:267.25:20");
mapa.push("96:71:1588:298.75:21");
mapa.push("115:61.25:1597.5:293.875:21");
mapa.push("96:8:1688:267.25:20");
mapa.push("96:8:1783.5:267.25:20");
mapa.push("96:8:1878.75:267.75:20");
mapa.push("99.5:76:1976:299.5:21");
mapa.push("96:8:2069:267.5:20");
mapa.push("96:8:2164.75:267:20");
mapa.push("112.75:54.5:2268.125:288:21");
mapa.push("96:8:2354.75:266.5:20");
mapa.push("96:8:2449.25:266.5:20");
mapa.push("96:8:2543.5:266.5:20");
mapa.push("107.5:72.5:2642:297:21");
mapa.push("96:8:2730:266.75:20");
mapa.push("96:8:2824.25:266.75:20");
mapa.push("96:8:2792.75:-1000.75:20");
mapa.push("96:71:2917.5:296.25:21");
mapa.push("96:8:3013.75:266.75:20");
mapa.push("64:32:2106.5:-561.5:5");
mapa.push("192:28:1686:260.5:6");
mapa.push("192:28:1336:260.5:6");
mapa.push("192:28:1336:260.5:6");
mapa.push("192:28:2021:260.5:6");
mapa.push("192:28:2353.5:260.5:6");
mapa.push("192:28:2691:260.5:6");
mapa.push("192:28:3018.5:263:6");
monedas.push("1312:176.5");
monedas.push("1337:176.5");
monedas.push("1362:176.5");
monedas.push("1387:176.5");
monedas.push("1412:176.5");
monedas.push("1437:176.5");
monedas.push("1462:176.5");
monedas.push("1487:176.5");
monedas.push("1512:176.5");
monedas.push("1537:176.5");
monedas.push("1659.5:174");
monedas.push("1684.5:174");
monedas.push("1709.5:174");
monedas.push("1734.5:174");
monedas.push("1759.5:174");
monedas.push("1784.5:174");
monedas.push("1809.5:174");
monedas.push("1834.5:174");
monedas.push("1859.5:174");
monedas.push("1884.5:174");
monedas.push("1987:171.5");
monedas.push("2012:171.5");
monedas.push("2037:171.5");
monedas.push("2062:171.5");
monedas.push("2087:171.5");
monedas.push("2112:171.5");
monedas.push("2137:171.5");
monedas.push("2162:171.5");
monedas.push("2187:171.5");
monedas.push("2212:171.5");
monedas.push("2339.5:169");
monedas.push("2364.5:169");
monedas.push("2389.5:169");
monedas.push("2414.5:169");
monedas.push("2439.5:169");
monedas.push("2464.5:169");
monedas.push("2489.5:169");
monedas.push("2514.5:169");
monedas.push("2539.5:169");
monedas.push("2564.5:169");
monedas.push("2657:176.5");
monedas.push("2682:176.5");
monedas.push("2707:176.5");
monedas.push("2732:176.5");
monedas.push("2757:176.5");
monedas.push("2782:176.5");
monedas.push("2807:176.5");
monedas.push("2832:176.5");
monedas.push("2857:176.5");
monedas.push("2882:176.5");
pinchos.push("1043.25:394");
pinchos.push("1075.75:394");
pinchos.push("1110.75:394");
pinchos.push("1143.25:394");
pinchos.push("1175.75:394");
pinchos.push("3003.25:394");
pinchos.push("2973.25:394");
pinchos.push("2355.75:391.5");
pinchos.push("2388.25:391.5");
pinchos.push("2420.75:391.5");
pinchos.push("2453.25:391.5");
pinchos.push("2485.75:391.5");
pinchos.push("2518.25:391.5");
pinchos.push("1665.75:391.5");
pinchos.push("1695.75:391.5");
pinchos.push("1728.25:391.5");
pinchos.push("1758.25:391.5");
pinchos.push("1788.25:391.5");
pinchos.push("1820.75:391.5");
pinchos.push("2018.25:394");
pinchos.push("2048.25:394");
pinchos.push("2078.25:394");
pinchos.push("2110.75:394");
pinchos.push("2140.75:394");
pinchos.push("2173.25:394");
mapa.push("64:32:1439:346:5");
mapa.push("64:32:2791.5:351:5");
monedas.push("1299.5:381.5");
monedas.push("1324.5:381.5");
monedas.push("1349.5:381.5");
monedas.push("1374.5:381.5");
monedas.push("1399.5:381.5");
monedas.push("1424.5:381.5");
monedas.push("1449.5:381.5");
monedas.push("1474.5:381.5");
monedas.push("1499.5:381.5");
monedas.push("1524.5:381.5");
monedas.push("2642:381.5");
monedas.push("2667:381.5");
monedas.push("2692:381.5");
monedas.push("2717:381.5");
monedas.push("2742:381.5");
monedas.push("2767:381.5");
monedas.push("2792:381.5");
monedas.push("2817:381.5");
monedas.push("2842:381.5");
monedas.push("2867:381.5");
mapa.push("256:256:3525:521.5:4");
mapa.push("256:256:3780:581.5:4");
mapa.push("256:256:4035:656.5:4");
mapa.push("256:256:4290:656.5:4");
mapa.push("256:256:4540:656.5:4");
mapa.push("256:256:4795:506.5:4");
mapa.push("256:256:5265:506.5:4");
mapa.push("256:256:5520:556.5:4");
mapa.push("256:256:5785:606.5:4");
mapa.push("256:256:5770:606.5:4");
mapa.push("256:256:6020:606.5:4");
mapa.push("116:64.75:4957.5:288.125:21");
mapa.push("96:8:5041.75:261.75:20");
mapa.push("96:8:4886.75:261.75:20");
mariquitas.push("4439.5:360.75");
mariquitas.push("4169.5:365.75");
mapa.push("64:131:941.25:231:7");
mapa.push("64:131:3426.25:271:7");
mapa.push("72:120:3991.25:403:15");
mapa.push("72:120:5436.25:303:15");
mapa.push("72:120:676.25:198:15");
mapa.push("72:120:2281.25:408:15");
mapa.push("64:131:4701.25:256:7");
mapa.push("64:131:5171.25:256:7");
monedas.push("5667:336.5");
monedas.push("5692:336.5");
monedas.push("5717:336.5");
monedas.push("5742:336.5");
monedas.push("5767:336.5");
monedas.push("5792:336.5");
monedas.push("5817:336.5");
monedas.push("5842:336.5");
monedas.push("5867:336.5");
monedas.push("5892:336.5");
split_map();
if (_root.person == "sonic") {
_root.soni._name = "sonic";
} else if (_root.person == "tails") {
_root.tails._name = "sonic";
} else if (_root.person == "knuckles") {
_root.knuckles._name = "sonic";
} else if (_root.person == "amy") {
_root.amy._name = "sonic";
} else if (_root.person == "shadow") {
_root.shadow._name = "sonic";
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
CuentaAtras = Math.round(getTimer() / 1000) + temp;
_root.onEnterFrame = function () {
_root.cargandillo._alpha = 0;
Tiempo = Math.round(getTimer() / 1000);
Restante = CuentaAtras - Tiempo;
if (Restante < 0) {
_root.sonic.reset();
}
};
stop();
Frame 107
_root.cargandillo._alpha = 100;
if (_root.vidas < 0) {
gotoAndPlay ("gameover");
} else {
stop();
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
_root.profundidad = 0;
_root.profundidad = 0;
_root.frame = 107;
_root.siguiente = 108;
_root.temp = 100;
_root.movimiento = 0;
_root.gravedad = 1;
_root.balas = 1;
_root.nivel = 5;
final = "5900:100";
var mapa = new Array();
var gusanos = new Array();
var monedas = new Array();
var muelles = new Array();
var totems = new Array();
var flors = new Array();
var gordos = new Array();
var arbols = new Array();
var arbolillos = new Array();
var pinchos = new Array();
var ranas = new Array();
var cocodrilos = new Array();
var rokalokas = new Array();
var batmans = new Array();
var calabazas = new Array();
var cangrejos = new Array();
var peras = new Array();
var stars = new Array();
var loops = new Array();
var mariquitas = new Array();
var lifes = new Array();
var burbujas = new Array();
var avispas = new Array();
var enefloras = new Array();
var eneflors = new Array();
var magnetos = new Array();
var pendulos = new Array();
mapa.push("512:127:-50017:453.25:24");
mapa.push("512:127:-50017:453.25:25");
mapa.push("512:127:-50017:453.25:26");
mapa.push("512:127:-50017:453.25:27");
mapa.push("512:127:-50017:453.25:28");
mapa.push("512:127:-50017:453.25:29");
mapa.push("512:127:-50017:453.25:30");
mapa.push("512:127:-50017:453.25:31");
mapa.push("512:127:-50017:453.25:32");
mapa.push("512:127:-50017:453.25:33");
mapa.push("512:127:-50017:453.25:34");
mapa.push("512:127:-50017:453.25:35");
mapa.push("512:127:-50017:453.25:36");
mapa.push("512:127:-50017:453.25:37");
mapa.push("512:127:-50017:453.25:38");
mapa.push("512:127:-50017:453.25:39");
mapa.push("512:127:-50017:453.25:40");
mapa.push("512:127:-50017:453.25:41");
mapa.push("512:127:-50017:453.25:42");
mapa.push("512:127:-50017:453.25:43");
mapa.push("512:127:-50017:453.25:44");
pendulos.push("-50017.25:206.25");
magnetos.push("-50017.25:206.25");
eneflors.push("-50017.25:206.25");
enefloras.push("-50017.25:206.25");
mariquitas.push("-50017.25:206.25");
mariquitas.push("-50017.25:206.25");
mapa.push("192:160:160:476.25:25");
mapa.push("192:160:350:476.25:25");
mapa.push("136:136:484:454.25:27");
mapa.push("96:160:580.25:513.75:26");
mapa.push("96:160:675.5:536.75:24");
mapa.push("96:160:1433:-423.25:24");
mapa.push("80:160:751.75:538.5:29");
mapa.push("96:160:1211.25:-423.25:28");
mapa.push("96:125:991.75:440.5:30");
mapa.push("96:117:1239.5:439.25:31");
mapa.push("96:149:1497.25:517:32");
mapa.push("96:160:1591.25:504.25:28");
mapa.push("96:160:1688:504.25:24");
mapa.push("192:160:1877.5:506.25:25");
mapa.push("96:160:1973.75:481.75:28");
mapa.push("192:160:2165:481.25:25");
mapa.push("192:160:2357.5:481.25:25");
mapa.push("192:160:2547.5:481.25:25");
mapa.push("192:160:2737.5:481.25:25");
mapa.push("96:189:2830.25:510:33");
mapa.push("96:189:2925.25:535:33");
mapa.push("96:189:3020.25:560:33");
mapa.push("96:189:3115.25:585:33");
mapa.push("192:160:3305:578.75:25");
mapa.push("192:160:3497.5:578.75:25");
mapa.push("192:160:3690:578.75:25");
mapa.push("96:160:3783.75:556.75:28");
mapa.push("96:160:3878.75:531.75:28");
mapa.push("96:160:3971.25:506.75:28");
mapa.push("96:160:4068.75:481.75:28");
mapa.push("192:160:4255:478.75:25");
mapa.push("192:160:4447.5:478.75:25");
mapa.push("192:160:4635:478.75:25");
mapa.push("192:160:4822.5:478.75:25");
mapa.push("192:160:5012.5:478.75:25");
mapa.push("192:160:5200:478.75:25");
mapa.push("96:160:5296.25:456.75:28");
mapa.push("192:160:5487.5:456.25:25");
mapa.push("192:160:5680:456.25:25");
mapa.push("192:160:5870:456.25:25");
mapa.push("192:160:6045:456.25:25");
mapa.push("193:88:235.5:324:39");
mapa.push("193:88:2305.5:331.5:39");
mapa.push("193:88:3358:426.5:39");
mapa.push("193:88:3513:426.5:39");
mapa.push("193:88:3653:424:39");
mapa.push("193:88:4465.5:324:39");
mapa.push("193:88:5060.5:326.5:39");
mapa.push("193:88:5833:301.5:39");
mapa.push("96:64:728.5:378.5:38");
mapa.push("96:64:1743.5:353.5:38");
mapa.push("61:40:2055.75:326.75:37");
mapa.push("64:40:330.5:317:36");
mapa.push("64:24:1833.25:349:40");
mapa.push("32:16:1216.25:325:41");
mapa.push("56:48:975:318.75:42");
mapa.push("59:160:1566.5:401.75:44");
mapa.push("75:142:1502.5:395.5:43");
mapa.push("59:160:1446.5:419.25:44");
mapa.push("59:160:2614:341.75:44");
mapa.push("75:142:2695:330.5:43");
mapa.push("56:48:2110:328.75:42");
mapa.push("61:40:4148.25:324.25:37");
mapa.push("56:48:4235:326.25:42");
mapa.push("56:48:5922.5:301.25:42");
mapa.push("56:48:4822.5:323.75:42");
mapa.push("75:142:4290:328:43");
mapa.push("59:160:4666.5:324.25:44");
mapa.push("59:160:3981.5:354.25:44");
mapa.push("59:160:3924:376.75:44");
mapa.push("59:160:3861.5:391.75:44");
mapa.push("59:160:3809:411.75:44");
mapa.push("59:160:3754:426.75:44");
mapa.push("59:160:4041.5:344.25:44");
mapa.push("59:160:5349:309.25:44");
mapa.push("59:160:5424:311.75:44");
mapa.push("59:160:5499:314.25:44");
mapa.push("75:142:402.5:335.5:43");
mapa.push("75:142:457.5:350.5:43");
mapa.push("75:142:517.5:360.5:43");
mapa.push("75:142:565:373:43");
mapa.push("75:142:615:383:43");
mapa.push("75:142:1635:355.5:43");
mapa.push("75:142:1990:335.5:43");
mapa.push("75:142:2695:330.5:43");
mapa.push("75:142:4522.5:333:43");
mapa.push("75:142:3170:433:43");
mapa.push("64:40:4615.5:327:36");
mapa.push("61:40:5588.25:306.75:37");
mapa.push("75:142:1877.5:365.5:43");
magnetos.push("300:200");
magnetos.push("1812.5:331");
magnetos.push("3065:383.5");
magnetos.push("5014:318.5");
magnetos.push("4452.5:308.5");
magnetos.push("2245:318.5");
magnetos.push("4000:350");
magnetos.push("5000:350");
magnetos.push("6000:350");
magnetos.push("7000:350");
monedas.push("2345.75:298.25");
monedas.push("2370.75:298.25");
monedas.push("2395.75:298.25");
monedas.push("2420.75:298.25");
monedas.push("2445.75:298.25");
monedas.push("2470.75:298.25");
monedas.push("2495.75:298.25");
monedas.push("2520.75:298.25");
monedas.push("2545.75:298.25");
monedas.push("2570.75:298.25");
monedas.push("128.25:293.25");
monedas.push("153.25:293.25");
monedas.push("178.25:293.25");
monedas.push("203.25:293.25");
monedas.push("228.25:293.25");
monedas.push("253.25:293.25");
monedas.push("278.25:293.25");
monedas.push("303.25:293.25");
monedas.push("328.25:293.25");
monedas.push("353.25:293.25");
monedas.push("965.75:260.75");
monedas.push("990.75:260.75");
monedas.push("1015.75:260.75");
monedas.push("1040.75:260.75");
monedas.push("1065.75:260.75");
monedas.push("1090.75:260.75");
monedas.push("1115.75:260.75");
monedas.push("1140.75:260.75");
monedas.push("1165.75:260.75");
monedas.push("1190.75:260.75");
monedas.push("3295.75:393.25");
monedas.push("3320.75:393.25");
monedas.push("3345.75:393.25");
monedas.push("3370.75:393.25");
monedas.push("3395.75:393.25");
monedas.push("3420.75:393.25");
monedas.push("3445.75:393.25");
monedas.push("3470.75:393.25");
monedas.push("3495.75:393.25");
monedas.push("3520.75:393.25");
monedas.push("4240.75:293.25");
monedas.push("4265.75:293.25");
monedas.push("4290.75:293.25");
monedas.push("4315.75:293.25");
monedas.push("4340.75:293.25");
monedas.push("4365.75:293.25");
monedas.push("4390.75:293.25");
monedas.push("4415.75:293.25");
monedas.push("4440.75:293.25");
monedas.push("4465.75:293.25");
monedas.push("5313.25:258.25");
monedas.push("5338.25:258.25");
monedas.push("5363.25:258.25");
monedas.push("5388.25:258.25");
monedas.push("5413.25:258.25");
monedas.push("5438.25:258.25");
monedas.push("5463.25:258.25");
monedas.push("5488.25:258.25");
monedas.push("5513.25:258.25");
monedas.push("5538.25:258.25");
split_map();
if (_root.person == "sonic") {
_root.soni._name = "sonic";
} else if (_root.person == "tails") {
_root.tails._name = "sonic";
} else if (_root.person == "knuckles") {
_root.knuckles._name = "sonic";
} else if (_root.person == "amy") {
_root.amy._name = "sonic";
} else if (_root.person == "shadow") {
_root.shadow._name = "sonic";
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
CuentaAtras = Math.round(getTimer() / 1000) + temp;
_root.onEnterFrame = function () {
_root.cargandillo._alpha = 0;
Tiempo = Math.round(getTimer() / 1000);
Restante = CuentaAtras - Tiempo;
if (Restante < 0) {
_root.sonic.reset();
}
};
stop();
Frame 108
_root.cargandillo._alpha = 100;
if (_root.vidas < 0) {
gotoAndPlay ("gameover");
} else {
stop();
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
_root.profundidad = 0;
_root.profundidad = 0;
_root.frame = 108;
_root.siguiente = 109;
_root.temp = 100;
_root.movimiento = 0;
_root.gravedad = 1;
_root.balas = 1;
_root.nivel = 6;
final = "5900:100";
var mapa = new Array();
var gusanos = new Array();
var monedas = new Array();
var muelles = new Array();
var totems = new Array();
var flors = new Array();
var gordos = new Array();
var arbols = new Array();
var arbolillos = new Array();
var pinchos = new Array();
var ranas = new Array();
var cocodrilos = new Array();
var rokalokas = new Array();
var batmans = new Array();
var calabazas = new Array();
var cangrejos = new Array();
var peras = new Array();
var stars = new Array();
var loops = new Array();
var mariquitas = new Array();
var lifes = new Array();
var burbujas = new Array();
var avispas = new Array();
var enefloras = new Array();
var eneflors = new Array();
var magnetos = new Array();
var pendulos = new Array();
mapa.push("512:127:-50017:453.25:24");
mapa.push("512:127:-50017:453.25:25");
mapa.push("512:127:-50017:453.25:26");
mapa.push("512:127:-50017:453.25:27");
mapa.push("512:127:-50017:453.25:28");
mapa.push("512:127:-50017:453.25:29");
mapa.push("512:127:-50017:453.25:30");
mapa.push("512:127:-50017:453.25:31");
mapa.push("512:127:-50017:453.25:32");
mapa.push("512:127:-50017:453.25:33");
mapa.push("512:127:-50017:453.25:34");
mapa.push("512:127:-50017:453.25:35");
mapa.push("512:127:-50017:453.25:36");
mapa.push("512:127:-50017:453.25:37");
mapa.push("512:127:-50017:453.25:38");
mapa.push("512:127:-50017:453.25:39");
mapa.push("512:127:-50017:453.25:40");
mapa.push("512:127:-50017:453.25:41");
mapa.push("512:127:-50017:453.25:42");
mapa.push("512:127:-50017:453.25:43");
mapa.push("512:127:-50017:453.25:44");
pendulos.push("-50017.25:206.25");
magnetos.push("-50017.25:206.25");
eneflors.push("-50017.25:206.25");
enefloras.push("-50017.25:206.25");
mapa.push("192:160:195:461.25:25");
mapa.push("192:160:385:461.25:25");
mapa.push("192:160:575:461.25:25");
mapa.push("96:160:667.75:461.25:26");
mapa.push("136:136:801.5:461.75:27");
mapa.push("96:160:898:519.25:24");
mapa.push("96:160:1315.25:-506.25:26");
mapa.push("192:160:1087.5:518.75:25");
mapa.push("96:160:1182.75:518.75:26");
mapa.push("136:136:1316.5:516.75:27");
mapa.push("192:160:1507.5:573.75:25");
mapa.push("192:160:1697.5:573.75:25");
mapa.push("96:160:1793.75:551.75:28");
mapa.push("96:160:1888.75:526.75:28");
mapa.push("96:160:1986.25:501.75:28");
mapa.push("96:160:1981.25:501.75:28");
mapa.push("96:160:2073.75:476.75:28");
mapa.push("96:160:2168.75:451.75:28");
mapa.push("192:160:2360:451.25:25");
mapa.push("192:160:2547.5:451.25:25");
mapa.push("192:160:2740:451.25:25");
mapa.push("192:160:2930:451.25:25");
mapa.push("192:160:3122.5:451.25:25");
mapa.push("96:125:3379.25:418:30");
mapa.push("96:117:3572:286.75:31");
mapa.push("96:149:2892.25:-493:32");
mapa.push("96:140:3776.5:423:34");
mapa.push("80:160:4004.25:451:29");
mapa.push("80:160:4084.25:451:29");
mapa.push("96:149:4327.25:332:32");
mapa.push("96:189:4420.25:372.5:33");
mapa.push("96:117:4517:321.75:31");
mapa.push("96:117:4612:321.75:31");
mapa.push("192:160:5022.5:451.25:25");
mapa.push("192:160:5215:451.25:25");
mapa.push("192:160:5405:451.25:25");
mapa.push("192:160:5595:451.25:25");
mapa.push("192:160:5787.5:451.25:25");
mapa.push("192:160:5975:451.25:25");
mapa.push("192:160:6127.5:451.25:25");
mapa.push("193:88:268:301.5:39");
mapa.push("193:88:1585.5:424:39");
mapa.push("193:88:2440.5:304:39");
mapa.push("193:88:5130.5:304:39");
mapa.push("193:88:6025.5:309:39");
mapa.push("193:88:4600.5:219:39");
mapa.push("193:88:3090.5:304:39");
mapa.push("192:160:2547.5:451.25:25");
mapa.push("56:48:1680:431.25:42");
mapa.push("56:48:990:376.25:42");
mapa.push("56:48:550:311.25:42");
mapa.push("56:48:3995:311.25:42");
mapa.push("56:48:5555:301.25:42");
mapa.push("56:48:3755:301.25:42");
mapa.push("56:48:3560:176.25:42");
mapa.push("56:48:3350:306.25:42");
mapa.push("96:64:1078.5:366:38");
mapa.push("96:64:2531:298.5:38");
mapa.push("96:64:3776:296:38");
mapa.push("96:64:4086:298.5:38");
mapa.push("96:64:4331:206:38");
mapa.push("96:64:4948.5:303.5:38");
mapa.push("96:64:5221:298.5:38");
mapa.push("96:64:5313.5:301:38");
mapa.push("61:40:5364.75:294.5:37");
mapa.push("64:40:5403:296.75:36");
mapa.push("64:24:5453:290.75:40");
mapa.push("32:16:5655:294:41");
mapa.push("32:16:3379:297.25:41");
mapa.push("64:24:2879.75:298:40");
mapa.push("64:40:3123.25:292:36");
mapa.push("96:64:2276.25:300.75:38");
mapa.push("96:64:2525.5:293.5:38");
mapa.push("96:64:2608.25:293.5:38");
mapa.push("193:88:2786:299.5:39");
mapa.push("193:88:2950:304:39");
mapa.push("75:142:1132:372.5:43");
mapa.push("75:142:1175.25:386:43");
mapa.push("75:142:1225.5:400.5:43");
mapa.push("75:142:1272.5:410.25:43");
mapa.push("75:142:1323.5:424:43");
mapa.push("75:142:1371.5:433:43");
mapa.push("59:160:615.25:325.5:44");
mapa.push("59:160:658:335.5:44");
mapa.push("59:160:701.75:344.75:44");
mapa.push("59:160:745.75:358.25:44");
mapa.push("59:160:783.25:369.75:44");
mapa.push("59:160:825.5:383.25:44");
mapa.push("59:160:852.5:381:44");
mapa.push("59:160:886.75:381:44");
mapa.push("59:160:920.5:381:44");
mapa.push("59:160:2560.5:296.5:44");
mapa.push("59:160:2886.25:304.25:44");
mapa.push("59:160:1829:396.25:44");
mapa.push("59:160:2011.5:362.5:44");
mapa.push("75:142:1750.5:413.75:43");
mapa.push("75:142:1933.75:362.25:43");
mapa.push("75:142:2109.25:325.5:43");
mapa.push("75:142:2345.25:300.25:43");
mapa.push("75:142:3375.25:296:43");
mapa.push("75:142:4413:204:43");
mapa.push("75:142:4951:304:43");
mapa.push("75:142:5738.25:302.75:43");
mapa.push("75:142:5334:298.25:43");
monedas.push("153.25:280.75");
monedas.push("178.25:280.75");
monedas.push("203.25:280.75");
monedas.push("228.25:280.75");
monedas.push("253.25:280.75");
monedas.push("278.25:280.75");
monedas.push("303.25:280.75");
monedas.push("328.25:280.75");
monedas.push("353.25:280.75");
monedas.push("378.25:280.75");
monedas.push("833.25:350.75");
monedas.push("858.25:350.75");
monedas.push("883.25:350.75");
monedas.push("908.25:350.75");
monedas.push("933.25:350.75");
monedas.push("958.25:350.75");
monedas.push("983.25:350.75");
monedas.push("1008.25:350.75");
monedas.push("1033.25:350.75");
monedas.push("1058.25:350.75");
monedas.push("1388.25:410.75");
monedas.push("1413.25:410.75");
monedas.push("1438.25:410.75");
monedas.push("1463.25:410.75");
monedas.push("1488.25:410.75");
monedas.push("1513.25:410.75");
monedas.push("1538.25:410.75");
monedas.push("1563.25:410.75");
monedas.push("1588.25:410.75");
monedas.push("1613.25:410.75");
monedas.push("2223.25:280.75");
monedas.push("2248.25:280.75");
monedas.push("2273.25:280.75");
monedas.push("2298.25:280.75");
monedas.push("2323.25:280.75");
monedas.push("2348.25:280.75");
monedas.push("2373.25:280.75");
monedas.push("2398.25:280.75");
monedas.push("2423.25:280.75");
monedas.push("2448.25:280.75");
monedas.push("2843.25:270.75");
monedas.push("2868.25:270.75");
monedas.push("2893.25:270.75");
monedas.push("2918.25:270.75");
monedas.push("2943.25:270.75");
monedas.push("2968.25:270.75");
monedas.push("2993.25:270.75");
monedas.push("3018.25:270.75");
monedas.push("3043.25:270.75");
monedas.push("3068.25:270.75");
monedas.push("4363.25:190.75");
monedas.push("4388.25:190.75");
monedas.push("4413.25:190.75");
monedas.push("4438.25:190.75");
monedas.push("4463.25:190.75");
monedas.push("4488.25:190.75");
monedas.push("4513.25:190.75");
monedas.push("4538.25:190.75");
monedas.push("4563.25:190.75");
monedas.push("4588.25:190.75");
monedas.push("4863.25:270.75");
monedas.push("4888.25:270.75");
monedas.push("4913.25:270.75");
monedas.push("4938.25:270.75");
monedas.push("4963.25:270.75");
monedas.push("4988.25:270.75");
monedas.push("5013.25:270.75");
monedas.push("5038.25:270.75");
monedas.push("5063.25:270.75");
monedas.push("5088.25:270.75");
mapa.push("193:88:3685.5:-891:39");
monedas.push("5593.25:275.75");
monedas.push("5618.25:275.75");
monedas.push("5643.25:275.75");
monedas.push("5668.25:275.75");
monedas.push("5693.25:275.75");
monedas.push("5718.25:275.75");
monedas.push("5743.25:275.75");
monedas.push("5768.25:275.75");
monedas.push("5793.25:275.75");
monedas.push("5818.25:275.75");
mapa.push("59:160:745.75:358.25:44");
eneflors.push("1702.75:407");
eneflors.push("2187.75:277");
eneflors.push("2789.75:287");
eneflors.push("4481.25:179.5");
eneflors.push("5212.25:284.5");
mapa.push("59:160:1515.75:-296.75:44");
mapa.push("59:160:1635.75:-236.75:44");
magnetos.push("5809:266");
mapa.push("192:160:572.5:461.25:25");
mapa.push("192:160:380:461.25:25");
mapa.push("192:160:190:461.25:25");
magnetos.push("819.25:345.25");
split_map();
if (_root.person == "sonic") {
_root.soni._name = "sonic";
} else if (_root.person == "tails") {
_root.tails._name = "sonic";
} else if (_root.person == "knuckles") {
_root.knuckles._name = "sonic";
} else if (_root.person == "amy") {
_root.amy._name = "sonic";
} else if (_root.person == "shadow") {
_root.shadow._name = "sonic";
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
CuentaAtras = Math.round(getTimer() / 1000) + temp;
_root.onEnterFrame = function () {
_root.cargandillo._alpha = 0;
Tiempo = Math.round(getTimer() / 1000);
Restante = CuentaAtras - Tiempo;
if (Restante < 0) {
_root.sonic.reset();
}
};
stop();
Instance of Symbol 1105 MovieClip "loop1" in Frame 108
onClipEvent (load) {
this.estado = "esperando";
}
onClipEvent (enterFrame) {
if ((this.entrada.hitTest(_root.sonic.pluton) && (_root.sonic.estado == "corriendo")) && (_root.sonic.lado == "derecha")) {
this.estado = "dentro";
this.lado = "izkierda";
_root.sonic._visible = 0;
_root.sonic.gira = 1;
_root.movimiento = 150;
_root.sonic._x = 100;
}
if ((this.salida.hitTest(_root.sonic.pluton) && (_root.sonic.estado == "corriendo")) && (_root.sonic.lado == "izquierda")) {
this.estado = "dentro";
this.lado = "derecha";
_root.sonic._visible = 0;
_root.sonic.gira = 1;
_root.movimiento = -200;
_root.sonic._x = 300;
}
this._x = this._x - _root.movimiento;
}
Instance of Symbol 1105 MovieClip in Frame 108
onClipEvent (load) {
this.estado = "esperando";
}
onClipEvent (enterFrame) {
if (this.estado == "fuera") {
this.stop();
}
if ((this.entrada.hitTest(_root.sonic.pluton) && (_root.sonic.estado == "corriendo")) && (_root.sonic.lado == "derecha")) {
this.estado = "dentro";
this.play();
_root.sonic._visible = 0;
_root.sonic.gira = 1;
}
this._x = this._x - _root.movimiento;
}
Instance of Symbol 826 MovieClip "plataformak" in Frame 108
onClipEvent (enterFrame) {
this._x = this._x - _root.movimiento;
}
Frame 109
_root.cargandillo._alpha = 100;
if (_root.vidas < 0) {
gotoAndPlay ("gameover");
} else {
stop();
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
_root.profundidad = 0;
_root.profundidad = 0;
_root.frame = 109;
_root.siguiente = 110;
_root.temp = 100;
_root.movimiento = 0;
_root.gravedad = 1;
_root.balas = 1;
_root.nivel = 7;
final = "5900:100";
var mapa = new Array();
var gusanos = new Array();
var monedas = new Array();
var muelles = new Array();
var totems = new Array();
var flors = new Array();
var gordos = new Array();
var arbols = new Array();
var arbolillos = new Array();
var pinchos = new Array();
var ranas = new Array();
var cocodrilos = new Array();
var rokalokas = new Array();
var batmans = new Array();
var calabazas = new Array();
var cangrejos = new Array();
var peras = new Array();
var stars = new Array();
var loops = new Array();
var mariquitas = new Array();
var lifes = new Array();
var burbujas = new Array();
var avispas = new Array();
var enefloras = new Array();
var eneflors = new Array();
var magnetos = new Array();
var pendulos = new Array();
mapa.push("512:127:-50017:453.25:24");
mapa.push("512:127:-50017:453.25:25");
mapa.push("512:127:-50017:453.25:26");
mapa.push("512:127:-50017:453.25:27");
mapa.push("512:127:-50017:453.25:28");
mapa.push("512:127:-50017:453.25:29");
mapa.push("512:127:-50017:453.25:30");
mapa.push("512:127:-50017:453.25:31");
mapa.push("512:127:-50017:453.25:32");
mapa.push("512:127:-50017:453.25:33");
mapa.push("512:127:-50017:453.25:34");
mapa.push("512:127:-50017:453.25:35");
mapa.push("512:127:-50017:453.25:36");
mapa.push("512:127:-50017:453.25:37");
mapa.push("512:127:-50017:453.25:38");
mapa.push("512:127:-50017:453.25:39");
mapa.push("512:127:-50017:453.25:40");
mapa.push("512:127:-50017:453.25:41");
mapa.push("512:127:-50017:453.25:42");
mapa.push("512:127:-50017:453.25:43");
mapa.push("512:127:-50017:453.25:44");
pendulos.push("-50017.25:206.25");
magnetos.push("-50017.25:206.25");
eneflors.push("-50017.25:206.25");
enefloras.push("-50017.25:206.25");
mapa.push("192:160:195:461.25:25");
mapa.push("192:160:385:461.25:25");
mapa.push("96:125:619.25:348:30");
mapa.push("96:117:842:266.75:31");
mapa.push("96:140:1041.5:385.5:34");
mapa.push("96:149:1259.75:272:32");
mapa.push("96:189:1352.75:312.5:33");
mapa.push("96:125:1581.75:428:30");
mapa.push("96:140:1806.5:328:34");
mapa.push("192:160:2245:451.25:25");
mapa.push("192:160:2437.5:451.25:25");
mapa.push("192:160:2627.5:451.25:25");
mapa.push("192:160:2817.5:451.25:25");
mapa.push("192:160:3005:451.25:25");
mapa.push("96:160:3097.75:451.25:26");
mapa.push("136:136:3234:451.75:27");
mapa.push("80:160:3314.25:508.5:29");
mapa.push("96:160:3408.75:486.75:28");
mapa.push("192:160:2247.5:451.25:25");
mapa.push("192:160:3600:483.75:25");
mapa.push("192:160:3792.5:483.75:25");
mapa.push("192:160:3980:483.75:25");
mapa.push("192:160:4167.5:483.75:25");
mapa.push("192:160:4360:483.75:25");
mapa.push("96:160:4453.75:461.75:28");
mapa.push("192:160:4645:461.25:25");
mapa.push("192:160:4837.5:461.25:25");
mapa.push("192:160:5027.5:461.25:25");
mapa.push("192:160:5217.5:461.25:25");
mapa.push("96:160:5310.25:461.25:26");
mapa.push("136:136:5444:461.75:27");
mapa.push("192:160:5027.5:461.25:25");
mapa.push("192:160:5635:518.75:25");
mapa.push("192:160:5827.5:518.75:25");
mapa.push("192:160:6020:518.75:25");
mapa.push("192:160:6120:518.75:25");
mapa.push("193:88:250.5:311.5:39");
mapa.push("193:88:383:309:39");
mapa.push("193:88:1355.5:164:39");
mapa.push("193:88:2258:301.5:39");
mapa.push("193:88:3380.5:366.5:39");
mapa.push("193:88:4258:339:39");
mapa.push("193:88:4635.5:311.5:39");
mapa.push("193:88:4818:309:39");
mapa.push("193:88:4985.5:309:39");
mapa.push("193:88:5153:304:39");
mapa.push("193:88:5213:309:39");
mapa.push("193:88:5650.5:366.5:39");
mapa.push("192:160:5827.5:518.75:25");
mapa.push("193:88:6050.5:366.5:39");
enefloras.push("1653.5:-344");
enefloras.push("2181:289.5");
enefloras.push("1298.5:151");
enefloras.push("356:306");
enefloras.push("3536:-518");
enefloras.push("4546:298.5");
enefloras.push("5126:298.5");
enefloras.push("5961:352");
enefloras.push("4171:323.5");
mapa.push("96:64:2333.5:298.5:38");
mapa.push("96:64:2408.5:298.5:38");
mapa.push("96:64:2753.5:303.5:38");
mapa.push("96:64:2913.5:303.5:38");
mapa.push("96:64:3708.5:333.5:38");
mapa.push("96:64:3778.5:328.5:38");
mapa.push("96:64:3843.5:328.5:38");
mapa.push("96:64:3898.5:328.5:38");
mapa.push("96:64:3953.5:328.5:38");
mapa.push("96:64:4503.5:313.5:38");
mapa.push("96:64:5718.5:363.5:38");
mapa.push("96:64:5803.5:363.5:38");
mapa.push("96:64:5878.5:363.5:38");
mapa.push("96:64:1803.5:203.5:38");
mapa.push("96:64:1038.5:253.5:38");
mapa.push("64:24:1555.75:304:40");
mapa.push("64:24:2575.75:289:40");
mapa.push("64:24:3535.75:329:40");
mapa.push("64:24:605.75:229:40");
mapa.push("61:40:805.75:156.75:37");
mapa.push("61:40:2465.75:296.75:37");
mapa.push("61:40:2965.75:296.75:37");
mapa.push("61:40:4005.75:331.75:37");
mapa.push("64:40:2810.5:299.5:36");
mapa.push("75:142:570:240.5:43");
mapa.push("75:142:845:155.5:43");
mapa.push("75:142:2515:305.5:43");
mapa.push("75:142:4080:340.5:43");
mapa.push("75:142:5430:355.5:43");
mapa.push("75:142:6105:365.5:43");
mapa.push("75:142:1230:155.5:43");
mapa.push("59:160:3109:331.75:44");
mapa.push("59:160:3589:346.75:44");
mapa.push("59:160:4319:346.75:44");
mapa.push("59:160:4854:316.75:44");
mapa.push("56:48:3015:291.25:42");
mapa.push("56:48:4360:331.25:42");
mapa.push("56:48:6130:366.25:42");
magnetos.push("2657.5:296");
eneflors.push("3061.25:-608");
eneflors.push("4000.25:322");
eneflors.push("5709.25:362");
eneflors.push("3295.25:357");
monedas.push("1323.25:-669.25");
monedas.push("1348.25:-669.25");
monedas.push("1373.25:-669.25");
monedas.push("1398.25:-669.25");
monedas.push("1423.25:-669.25");
monedas.push("1448.25:-669.25");
monedas.push("1473.25:-669.25");
monedas.push("1498.25:-669.25");
monedas.push("1523.25:-669.25");
monedas.push("1548.25:-669.25");
monedas.push("123.25:285.75");
monedas.push("148.25:285.75");
monedas.push("173.25:285.75");
monedas.push("198.25:285.75");
monedas.push("223.25:285.75");
monedas.push("248.25:285.75");
monedas.push("273.25:285.75");
monedas.push("298.25:285.75");
monedas.push("323.25:285.75");
monedas.push("348.25:285.75");
mapa.push("193:88:378:314:39");
monedas.push("1808.25:-609.25");
monedas.push("1833.25:-609.25");
monedas.push("1858.25:-609.25");
monedas.push("1883.25:-609.25");
monedas.push("1908.25:-609.25");
monedas.push("1933.25:-609.25");
monedas.push("1958.25:-609.25");
monedas.push("1983.25:-609.25");
monedas.push("2008.25:-609.25");
monedas.push("2033.25:-609.25");
monedas.push("2128.25:275.75");
monedas.push("2153.25:275.75");
monedas.push("2178.25:275.75");
monedas.push("2203.25:275.75");
monedas.push("2228.25:275.75");
monedas.push("2253.25:275.75");
monedas.push("2278.25:275.75");
monedas.push("2303.25:275.75");
monedas.push("2328.25:275.75");
monedas.push("2353.25:275.75");
monedas.push("3663.25:320.75");
monedas.push("3688.25:320.75");
monedas.push("3713.25:320.75");
monedas.push("3738.25:320.75");
monedas.push("3763.25:320.75");
monedas.push("3788.25:320.75");
monedas.push("3813.25:320.75");
monedas.push("3838.25:320.75");
monedas.push("3863.25:320.75");
monedas.push("3888.25:320.75");
monedas.push("4643.25:290.75");
monedas.push("4668.25:290.75");
monedas.push("4693.25:290.75");
monedas.push("4718.25:290.75");
monedas.push("4743.25:290.75");
monedas.push("4768.25:290.75");
monedas.push("4793.25:290.75");
monedas.push("4818.25:290.75");
monedas.push("4843.25:290.75");
monedas.push("4868.25:290.75");
monedas.push("3913.25:320.75");
monedas.push("3938.25:320.75");
monedas.push("3963.25:320.75");
monedas.push("3988.25:320.75");
monedas.push("4013.25:320.75");
monedas.push("4038.25:320.75");
monedas.push("4063.25:320.75");
monedas.push("4088.25:320.75");
monedas.push("4113.25:320.75");
monedas.push("4138.25:320.75");
monedas.push("5588.25:350.75");
monedas.push("5613.25:350.75");
monedas.push("5638.25:350.75");
monedas.push("5663.25:350.75");
monedas.push("5688.25:350.75");
monedas.push("5713.25:350.75");
monedas.push("5738.25:350.75");
monedas.push("5763.25:350.75");
monedas.push("5788.25:350.75");
monedas.push("5813.25:350.75");
mapa.push("192:160:192.5:456.25:25");
mapa.push("192:160:377.5:456.25:25");
mapa.push("192:160:392.5:456.25:25");
split_map();
if (_root.person == "sonic") {
_root.soni._name = "sonic";
} else if (_root.person == "tails") {
_root.tails._name = "sonic";
} else if (_root.person == "knuckles") {
_root.knuckles._name = "sonic";
} else if (_root.person == "amy") {
_root.amy._name = "sonic";
} else if (_root.person == "shadow") {
_root.shadow._name = "sonic";
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
CuentaAtras = Math.round(getTimer() / 1000) + temp;
_root.onEnterFrame = function () {
_root.cargandillo._alpha = 0;
Tiempo = Math.round(getTimer() / 1000);
Restante = CuentaAtras - Tiempo;
if (Restante < 0) {
_root.sonic.reset();
}
};
stop();
Frame 110
_root.cargandillo._alpha = 100;
if (_root.vidas < 0) {
gotoAndPlay ("gameover");
} else {
stop();
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
_root.profundidad = 0;
_root.profundidad = 0;
_root.frame = 110;
_root.siguiente = 376;
_root.temp = 100;
_root.movimiento = 0;
_root.gravedad = 1;
_root.balas = 1;
_root.nivel = 8;
final = "5900:100";
var mapa = new Array();
var gusanos = new Array();
var monedas = new Array();
var muelles = new Array();
var totems = new Array();
var flors = new Array();
var gordos = new Array();
var arbols = new Array();
var arbolillos = new Array();
var pinchos = new Array();
var ranas = new Array();
var cocodrilos = new Array();
var rokalokas = new Array();
var batmans = new Array();
var calabazas = new Array();
var cangrejos = new Array();
var peras = new Array();
var stars = new Array();
var loops = new Array();
var mariquitas = new Array();
var lifes = new Array();
var burbujas = new Array();
var avispas = new Array();
var enefloras = new Array();
var eneflors = new Array();
var magnetos = new Array();
var pendulos = new Array();
mapa.push("512:127:-50017:453.25:24");
mapa.push("512:127:-50017:453.25:25");
mapa.push("512:127:-50017:453.25:26");
mapa.push("512:127:-50017:453.25:27");
mapa.push("512:127:-50017:453.25:28");
mapa.push("512:127:-50017:453.25:29");
mapa.push("512:127:-50017:453.25:30");
mapa.push("512:127:-50017:453.25:31");
mapa.push("512:127:-50017:453.25:32");
mapa.push("512:127:-50017:453.25:33");
mapa.push("512:127:-50017:453.25:34");
mapa.push("512:127:-50017:453.25:35");
mapa.push("512:127:-50017:453.25:36");
mapa.push("512:127:-50017:453.25:37");
mapa.push("512:127:-50017:453.25:38");
mapa.push("512:127:-50017:453.25:39");
mapa.push("512:127:-50017:453.25:40");
mapa.push("512:127:-50017:453.25:41");
mapa.push("512:127:-50017:453.25:42");
mapa.push("512:127:-50017:453.25:43");
mapa.push("512:127:-50017:453.25:44");
pendulos.push("-50017.25:206.25");
magnetos.push("-50017.25:206.25");
eneflors.push("-50017.25:206.25");
enefloras.push("-50017.25:206.25");
pinchos.push("-50017.25:206.25");
mapa.push("192:160:195:596.25:25");
mapa.push("96:160:291.25:571.75:28");
mapa.push("96:160:386.25:546.75:28");
mapa.push("96:160:478.75:523:28");
mapa.push("96:160:672.5:461.75:28");
mapa.push("96:149:767.25:422:32");
mapa.push("96:160:671.25:456.75:28");
mapa.push("96:149:857.25:397:32");
mapa.push("96:189:950.25:437.5:33");
mapa.push("96:189:1042.75:460:33");
mapa.push("96:160:1127.75:451.25:26");
mapa.push("136:136:1379:476.75:27");
mapa.push("136:136:1514:511.75:27");
mapa.push("192:160:1705:568.75:25");
mapa.push("192:160:1897.5:568.75:25");
mapa.push("96:140:2109:478:34");
mapa.push("96:125:2301.75:395.5:30");
mapa.push("96:117:2457:276.75:31");
mapa.push("96:140:2459:528:34");
mapa.push("96:117:2652:231.75:31");
mapa.push("96:140:2616.5:485.5:34");
mapa.push("96:125:2784.25:518:30");
mapa.push("96:125:2951.75:485.5:30");
mapa.push("96:125:3171.75:520.5:30");
mapa.push("96:125:3379.25:473:30");
mapa.push("96:125:3581.75:533:30");
mapa.push("96:125:3789.25:445.5:30");
mapa.push("96:125:3986.75:530.5:30");
mapa.push("96:125:4166.75:468:30");
mapa.push("96:125:4369.25:518:30");
mapa.push("96:125:4524.25:478:30");
mapa.push("96:125:4711.75:513:30");
mapa.push("96:125:4894.25:450.5:30");
mapa.push("96:117:2784.5:304.25:31");
mapa.push("96:125:2954.25:263:30");
mapa.push("96:125:3124.25:210.5:30");
mapa.push("96:125:3274.25:178:30");
mapa.push("96:125:3439.25:233:30");
mapa.push("96:125:3651.75:223:30");
mapa.push("96:125:3834.25:250.5:30");
mapa.push("96:125:3114.25:508:30");
mapa.push("96:125:3241.75:513:30");
mapa.push("96:125:3979.25:275.5:30");
mapa.push("96:117:4139.5:224.25:31");
mapa.push("96:117:4294.5:191.75:31");
mapa.push("96:117:4454.5:214.25:31");
mapa.push("96:117:4624.5:249.25:31");
mapa.push("96:117:4774.5:201.75:31");
mapa.push("96:117:4919.5:231.75:31");
mapa.push("192:160:5237.5:463.75:25");
mapa.push("192:160:5427.5:463.75:25");
mapa.push("192:160:5615:463.75:25");
mapa.push("192:160:5805:463.75:25");
mapa.push("192:160:5995:463.75:25");
mapa.push("193:88:1898:414:39");
mapa.push("193:88:183:446.5:39");
mapa.push("193:88:948:284:39");
mapa.push("96:189:1042.75:460:33");
mapa.push("96:64:1713.5:413.5:38");
mapa.push("96:64:1616:416:38");
mapa.push("96:64:271:448.5:38");
mapa.push("64:24:2088.25:344:40");
mapa.push("61:40:2268.25:271.75:37");
mapa.push("64:40:2780.5:187:36");
mapa.push("56:48:2600:348.75:42");
mapa.push("32:16:2391.25:165:41");
mapa.push("59:160:1001.5:304.25:44");
mapa.push("59:160:1109:316.75:44");
mapa.push("59:160:1306.5:359.25:44");
mapa.push("59:160:1426.5:391.75:44");
mapa.push("59:160:1519:416.75:44");
mapa.push("75:142:1060:318:43");
mapa.push("75:142:1365:383:43");
mapa.push("75:142:1480:415.5:43");
mapa.push("75:142:755:298:43");
mapa.push("75:142:635:333:43");
mapa.push("75:142:457.5:385.5:43");
mapa.push("75:142:340:425.5:43");
mapa.push("59:160:689:319.25:44");
mapa.push("59:160:386.5:406.75:44");
mapa.push("75:142:2452.5:173:43");
mapa.push("75:142:2917.5:158:43");
mapa.push("61:40:2923.25:366.75:37");
mapa.push("61:40:3408.25:114.25:37");
mapa.push("64:40:3433:114.5:36");
mapa.push("64:40:3783:329.5:36");
mapa.push("75:142:3205:403:43");
mapa.push("75:142:3545:418:43");
mapa.push("56:48:3097.5:391.25:42");
mapa.push("56:48:3797.5:133.75:42");
mapa.push("56:48:4137.5:353.75:42");
mapa.push("75:142:4342.5:405.5:43");
mapa.push("75:142:4610:138:43");
mapa.push("59:160:3354:361.75:44");
mapa.push("59:160:4694:404.25:44");
mapa.push("59:160:4904:119.25:44");
mapa.push("56:48:4300:81.25:42");
mapa.push("56:48:4857.5:333.75:42");
mapa.push("56:48:3380:356.25:42");
mapa.push("56:48:2955:146.25:42");
mapa.push("64:40:4518:359.5:36");
mapa.push("64:40:4623:142:36");
mapa.push("64:40:3975.5:159.5:36");
mapa.push("61:40:3095.75:94.25:37");
mapa.push("61:40:4680.75:399.25:37");
mapa.push("61:40:4743.25:86.75:37");
mapa.push("193:88:5243:314:39");
mapa.push("193:88:5413:309:39");
mapa.push("193:88:5583:324:39");
mapa.push("64:40:4450.5:107:36");
pinchos.push("1263.25:-478.5");
pinchos.push("775.75:264");
pinchos.push("1373.25:364");
pinchos.push("1843.25:401.5");
pinchos.push("1148.25:436.5");
pinchos.push("1175.75:436.5");
pinchos.push("1203.25:436.5");
pinchos.push("1233.25:436.5");
pinchos.push("495.75:434");
pinchos.push("528.25:434");
pinchos.push("550.75:434");
pinchos.push("568.25:434");
pinchos.push("495.75:434");
pinchos.push("2275.75:261.5");
pinchos.push("3103.25:81.5");
pinchos.push("3328.25:336.5");
mapa.push("59:160:3501.5:-370.75:44");
pinchos.push("3508.25:401.5");
pinchos.push("4065.75:99");
pinchos.push("4478.25:344");
pinchos.push("4640.75:381.5");
pinchos.push("4730.75:76.5");
pinchos.push("4250.75:61.5");
eneflors.push("986.25:272");
eneflors.push("404.25:382");
eneflors.push("1769.75:407");
mapa.push("59:160:1519:416.75:44");
monedas.push("2643.25:-1284.25");
monedas.push("2668.25:-1284.25");
monedas.push("2693.25:-1284.25");
monedas.push("2718.25:-1284.25");
monedas.push("2743.25:-1284.25");
monedas.push("2768.25:-1284.25");
monedas.push("2793.25:-1284.25");
monedas.push("2818.25:-1284.25");
monedas.push("2843.25:-1284.25");
monedas.push("2868.25:-1284.25");
monedas.push("5053.25:270.75");
monedas.push("5078.25:270.75");
monedas.push("5103.25:270.75");
monedas.push("5128.25:270.75");
monedas.push("5153.25:270.75");
monedas.push("5178.25:270.75");
monedas.push("5203.25:270.75");
monedas.push("5228.25:270.75");
monedas.push("5253.25:270.75");
monedas.push("5278.25:270.75");
monedas.push("5303.25:270.75");
monedas.push("5328.25:270.75");
monedas.push("5353.25:270.75");
monedas.push("5378.25:270.75");
monedas.push("5403.25:270.75");
monedas.push("5428.25:270.75");
monedas.push("5453.25:270.75");
monedas.push("5478.25:270.75");
monedas.push("5503.25:270.75");
monedas.push("5528.25:270.75");
monedas.push("5558.25:270.75");
monedas.push("5583.25:270.75");
monedas.push("5608.25:270.75");
monedas.push("5633.25:270.75");
monedas.push("5658.25:270.75");
monedas.push("5683.25:270.75");
monedas.push("5708.25:270.75");
monedas.push("5733.25:270.75");
monedas.push("5758.25:270.75");
monedas.push("5783.25:270.75");
enefloras.push("2756:181");
enefloras.push("3428.5:108.5");
enefloras.push("4301:379.5");
enefloras.push("5301:292");
enefloras.push("5468.5:301");
split_map();
if (_root.person == "sonic") {
_root.soni._name = "sonic";
} else if (_root.person == "tails") {
_root.tails._name = "sonic";
} else if (_root.person == "knuckles") {
_root.knuckles._name = "sonic";
} else if (_root.person == "amy") {
_root.amy._name = "sonic";
} else if (_root.person == "shadow") {
_root.shadow._name = "sonic";
}
_root.fondo._x = -2.4;
_root.fondo._y = 1.4;
_root.sonic._x = 77.3;
_root.sonic._y = 222.3;
CuentaAtras = Math.round(getTimer() / 1000) + temp;
_root.onEnterFrame = function () {
_root.cargandillo._alpha = 0;
Tiempo = Math.round(getTimer() / 1000);
Restante = CuentaAtras - Tiempo;
if (Restante < 0) {
_root.sonic.reset();
}
};
stop();
Frame 375
limpia_pantalla();
var mi_so = SharedObject.getLocal("sonikkkii");
mi_so.onStatus = function (infoObject) {
for (var _local2 in infoObject) {
trace(((_local2 + "-") + infoObject[_local2]) + newline);
}
};
trace(_root.person);
mi_so.data.person = _root.person;
trace(mi_so.data.person);
mi_so.data.frame = _root.frame;
mi_so.data.lifes = _root.vidas;
mi_so.data.score = _root.puntos;
mi_so.data.rings = _root.rings;
mi_so.data.completer = _root.completer;
var flushResult = mi_so.flush(1000001);
switch (flushResult) {
case "pending" :
trace("flush is pending, waiting on user interaction.");
break;
case true :
trace("flush was successful. Requested storage space approved.");
break;
case false :
trace("flush failed. User denied request for additional storage.");
}
trace(mi_so.data.person);
stop();
Frame 376
limpia_pantalla();
_root.completer = 1;
stop();
Symbol 16 MovieClip [pnFlashGames] Frame 1
#initclip 1
pnFlashGames = function () {
this.gid = _root.pn_gid;
this.uname = _root.pn_uname;
this.busy = false;
this.gameSaved = null;
this.gameLoaded = null;
this.scoreStored = null;
this.gameData = "";
};
pnFlashGames.prototype.saveGame = function (gameData) {
this.busy = true;
varsObj = new LoadVars();
varsObj.func = "saveGame";
varsObj.gid = this.gid;
varsObj.gameData = gameData;
varsObj.type = "user";
varsObj.module = "pnFlashGames";
varsObj.parent = this;
varsObj.onLoad = this.saveGame_Result;
varsObj.sendAndLoad("index.php", varsObj, "POST");
};
pnFlashGames.prototype.saveGame_Result = function (success) {
this.parent._parent.incoming = this.opSuccess;
if (this.opSuccess == "true") {
this.parent.gameSaved = true;
} else {
this.parent.gameSaved = false;
}
this.parent.busy = false;
};
pnFlashGames.prototype.loadGame = function () {
this.busy = true;
varsObj = new LoadVars();
varsObj.func = "loadGame";
varsObj.gid = this.gid;
varsObj.type = "user";
varsObj.module = "pnFlashGames";
varsObj.parent = this;
varsObj.onLoad = this.loadGame_Result;
varsObj.sendAndLoad("index.php", varsObj, "POST");
};
pnFlashGames.prototype.loadGame_Result = function (success) {
if (this.opSuccess == "true") {
this.parent.gameLoaded = true;
this.parent.gameData = gameData;
} else {
this.parent.gameLoaded = false;
}
if (this.parent.onLoadGame != null) {
this.parent.onLoadGame(this.gameData);
}
this.parent.busy = false;
};
pnFlashGames.prototype.storeScore = function (score) {
this.busy = true;
varsObj = new LoadVars();
varsObj.score = score;
varsObj.func = "storeScore";
varsObj.gid = this.gid;
varsObj.type = "user";
varsObj.module = "pnFlashGames";
varsObj.parent = this;
varsObj.onLoad = this.storeScore_Result;
varsObj.sendAndLoad("index.php", varsObj, "POST");
};
pnFlashGames.prototype.storeScore_Result = function (success) {
if (this.opSuccess == "true") {
this.parent.scoreStored = true;
} else {
this.parent.scoreStored = false;
}
this.parent.busy = false;
};
Object.registerClass("pnFlashGames", pnFlashGames);
#endinitclip
Symbol 29 Button
on (release) {
getURL ("http://www.dailygames.com/", "_blank");
}
Symbol 42 MovieClip Frame 122
_parent.gotoAndPlay("cargado");
stop();
Symbol 43 MovieClip Frame 61
function cargando() {
var _local2;
var _local3;
var _local4;
_local2 = _root.getBytesTotal();
_local3 = _root.getBytesLoaded();
_local4 = Math.floor((_local3 * 100) / _local2);
porcentaje_txt.text = _local4 + " %";
loaderJD.gotoAndStop(_local4);
if (_local3 == _local2) {
clearInterval(hiloPrecarga);
play();
}
}
var hiloPrecarga = setInterval(cargando, 1);
stop();
Symbol 43 MovieClip Frame 120
_parent.gotoAndPlay(2);
Symbol 44 MovieClip Frame 50
stop();
_parent.gotoAndPlay(99);
Symbol 54 Button
on (release) {
getURL ("http://www.juegalmaximo.info", "_blank");
}
Symbol 61 Button
on (release) {
gotoAndPlay (45);
}
Symbol 67 Button
on (release) {
gotoAndPlay (100);
}
Symbol 68 Button
on (press) {
getURL ("http://www.dailygames.com", "_blank");
}
Symbol 72 Button
on (press) {
getURL ("http://www.dailygames.com/sonicxtreme2.zip ", "_blank");
}
Symbol 77 Button
on (release) {
trace("/////////////////////////////////////");
var mi_so = SharedObject.getLocal("sonikkkii");
var flushResult = my_so.flush(1000001);
switch (flushResult) {
case "pending" :
trace("flush is pending, waiting on user interaction.");
break;
case true :
trace("flush was successful. Requested storage space approved.");
break;
case false :
trace("flush failed. User denied request for additional storage.");
}
trace(mi_so.data.person);
if (mi_so.data.person != undefined) {
trace("cargando");
trace(mi_so.data.person);
trace(mi_so.data.frame);
trace(mi_so.data.lifes);
trace(mi_so.data.score);
trace(mi_so.data.rings);
trace(mi_so.data.completer);
_root.person = mi_so.data.person;
_root.frame = mi_so.data.frame;
_root.vidas = mi_so.data.lifes;
_root.puntos = mi_so.data.score;
_root.rings = mi_so.data.rings;
_root.completer = mi_so.data.completer;
mi_so.flush();
_root.gotoAndPlay(_root.frame);
}
}
Symbol 86 Button
on (release) {
_root.person = "tails";
_root.gotoAndPlay(103);
}
Symbol 89 Button
on (release) {
_root.person = "knuckles";
_root.gotoAndPlay(103);
}
Symbol 92 Button
on (release) {
if (_root.completer == 1) {
_root.person = "amy";
_root.gotoAndPlay(103);
}
}
Symbol 95 Button
on (release) {
if (_root.completer == 1) {
_root.person = "shadow";
_root.gotoAndPlay(103);
}
}
Symbol 99 Button
on (release) {
if (_root.completer == 1) {
_root.person = "amy";
_root.gotoAndPlay(103);
}
}
Instance of Symbol 83 MovieClip in Symbol 100 MovieClip Frame 1
on (release) {
_root.person = "sonic";
_root.gotoAndPlay(103);
}
Instance of Symbol 83 MovieClip in Symbol 100 MovieClip Frame 12
on (release) {
_root.person = "sonic";
_root.gotoAndPlay(103);
}
Instance of Symbol 97 MovieClip in Symbol 100 MovieClip Frame 36
onClipEvent (enterFrame) {
if (_root.completer == 1) {
this._alpha = 0;
}
}
Symbol 100 MovieClip Frame 60
stop();
Symbol 103 Button
on (release) {
gotoAndPlay (99);
}
Symbol 109 Button
on (release) {
this.gotoAndPlay(31);
}
Symbol 110 Button
on (release) {
gotoAndPlay (1);
}
Symbol 111 Button
on (release) {
_root.frame = 1;
play();
}
Instance of Symbol 112 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.person == "tails") {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Instance of Symbol 113 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.person == "sonic") {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Instance of Symbol 114 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.person == "shadow") {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Instance of Symbol 115 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.person == "knuckles") {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Instance of Symbol 116 MovieClip in Symbol 117 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.person == "amy") {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Symbol 120 MovieClip Frame 23
txt_vidas = ("X " + _root.vidas) + " LIFES";
stop();
Symbol 120 MovieClip Frame 36
_root.gotoAndPlay(_root.frame);
Symbol 199 MovieClip Frame 8
_root.gotoAndPlay("continuar");
Symbol 213 MovieClip Frame 6
stop();
Instance of Symbol 212 MovieClip in Symbol 213 MovieClip Frame 6
onClipEvent (enterFrame) {
_root.sonic.estado = "andando";
_root.sonic.gotoAndStop(5);
}
Symbol 214 MovieClip Frame 1
stop();
Symbol 214 MovieClip Frame 2
stop();
Symbol 214 MovieClip Frame 3
stop();
Symbol 214 MovieClip Frame 5
stop();
Symbol 214 MovieClip Frame 6
stop();
Symbol 214 MovieClip Frame 7
stop();
Symbol 214 MovieClip Frame 8
stop();
Symbol 293 MovieClip Frame 7
_root.gotoAndPlay("continuar");
Symbol 311 MovieClip Frame 8
stop();
Instance of Symbol 310 MovieClip in Symbol 311 MovieClip Frame 8
onClipEvent (enterFrame) {
_root.sonic.estado = "andando";
_root.sonic.gotoAndStop(3);
}
Symbol 312 MovieClip Frame 1
stop();
Symbol 312 MovieClip Frame 2
stop();
Symbol 312 MovieClip Frame 3
stop();
Symbol 312 MovieClip Frame 4
stop();
Symbol 312 MovieClip Frame 5
stop();
Symbol 312 MovieClip Frame 6
stop();
Symbol 312 MovieClip Frame 7
stop();
Symbol 312 MovieClip Frame 8
stop();
Symbol 432 MovieClip Frame 14
_root.gotoAndPlay("continuar");
Symbol 448 MovieClip Frame 7
stop();
Instance of Symbol 447 MovieClip in Symbol 448 MovieClip Frame 7
onClipEvent (enterFrame) {
_root.sonic.estado = "andando";
_root.sonic.gotoAndStop(3);
}
Symbol 464 MovieClip Frame 7
stop();
Instance of Symbol 463 MovieClip in Symbol 464 MovieClip Frame 7
onClipEvent (enterFrame) {
_root.sonic.estado = "bajando";
_root.sonic.gotoAndStop(4);
}
Symbol 465 MovieClip Frame 1
stop();
Symbol 465 MovieClip Frame 2
stop();
Symbol 465 MovieClip Frame 3
stop();
Symbol 465 MovieClip Frame 4
stop();
Symbol 465 MovieClip Frame 5
stop();
Symbol 465 MovieClip Frame 6
stop();
Symbol 465 MovieClip Frame 7
stop();
Symbol 465 MovieClip Frame 8
stop();
Symbol 465 MovieClip Frame 9
stop();
Symbol 537 MovieClip Frame 8
_root.gotoAndPlay("continuar");
Symbol 567 MovieClip Frame 14
stop();
Instance of Symbol 566 MovieClip in Symbol 567 MovieClip Frame 14
onClipEvent (enterFrame) {
_root.sonic.estado = "andando";
_root.sonic.gotoAndStop(3);
}
Symbol 587 MovieClip Frame 9
stop();
Instance of Symbol 586 MovieClip in Symbol 587 MovieClip Frame 9
onClipEvent (enterFrame) {
_root.sonic.estado = "bajando";
_root.sonic.gotoAndStop(4);
}
Symbol 588 MovieClip Frame 1
stop();
Symbol 588 MovieClip Frame 2
stop();
Symbol 588 MovieClip Frame 3
stop();
Symbol 588 MovieClip Frame 4
stop();
Symbol 588 MovieClip Frame 5
stop();
Symbol 588 MovieClip Frame 6
stop();
Symbol 588 MovieClip Frame 7
stop();
Symbol 588 MovieClip Frame 8
stop();
Symbol 588 MovieClip Frame 9
stop();
Symbol 654 MovieClip Frame 3
stop();
Symbol 665 MovieClip Frame 5
_root.gotoAndPlay("continuar");
Symbol 683 MovieClip Frame 1
stop();
Symbol 683 MovieClip Frame 2
stop();
Symbol 683 MovieClip Frame 3
stop();
Symbol 683 MovieClip Frame 4
stop();
Symbol 683 MovieClip Frame 5
stop();
Symbol 683 MovieClip Frame 6
stop();
Symbol 683 MovieClip Frame 7
stop();
Symbol 683 MovieClip Frame 8
stop();
Instance of Symbol 735 MovieClip in Symbol 736 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sonic) && (_root.sonic.estado != "muerto")) {
_root.sonic.reset();
}
}
Symbol 799 MovieClip Frame 16
_parent.swapDepths(1);
_parent.removeMovieClip();
Symbol 800 MovieClip Frame 1
stop();
Symbol 800 MovieClip Frame 2
stop();
Symbol 817 MovieClip Frame 25
gotoAndPlay (1);
Instance of Symbol 823 MovieClip "dere" in Symbol 826 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 823 MovieClip "izki" in Symbol 826 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 825 MovieClip "aba" in Symbol 826 MovieClip Frame 1
/* no clip actions */
Symbol 851 MovieClip Frame 13
gotoAndPlay (1);
Symbol 857 MovieClip Frame 1
stop();
Symbol 866 MovieClip Frame 12
gotoAndPlay (1);
Symbol 892 MovieClip Frame 9
gotoAndPlay (1);
Symbol 919 MovieClip Frame 13
gotoAndPlay (1);
Symbol 936 MovieClip Frame 5
if (this.atacando == 1) {
gotoAndPlay (10);
} else {
gotoAndPlay (1);
}
Symbol 936 MovieClip Frame 10
_root.balas++;
_root.bala1.duplicateMovieClip("bala" + _root.balas, _root.balas + 8000);
_root["bala" + _root.balas]._x = this._x;
_root["bala" + _root.balas]._y = this._y + this._height;
_root["bala" + _root.balas].activo = 1;
Symbol 936 MovieClip Frame 11
this.atacando = 0;
gotoAndPlay (1);
Symbol 948 MovieClip Frame 1
stop();
Symbol 948 MovieClip Frame 25
_root.puntos = _root.puntos + 300;
_root.nivel = _root.nivel + 1;
_root.gotoAndPlay(375);
Symbol 974 MovieClip Frame 14
gotoAndPlay (1);
Symbol 974 MovieClip Frame 15
stop();
Symbol 979 MovieClip Frame 1
stop();
Symbol 979 MovieClip Frame 2
stop();
Symbol 988 MovieClip Frame 4
gotoAndPlay (1);
Symbol 988 MovieClip Frame 5
stop();
Instance of Symbol 716 MovieClip "9curvao" in Symbol 1009 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = this._x - _root.movimiento;
}
Instance of Symbol 800 MovieClip "rana1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
n = 4;
count = 0;
tocandosuelo = 0;
puntos = 30 + random(10);
bajada = 2;
max = 5000 + random(30);
lado = "izquierda";
}
onClipEvent (enterFrame) {
tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (this.hitTest(_root["plataforma2" + i])) {
tocandosuelo = 1;
}
if (this.izke.hitTest(_root["plataforma2" + i])) {
while (this.izke.hitTest(_root["plataforma2" + i])) {
if (this.lado == "izquierda") {
this._x = this._x + 1;
} else {
this._x = this._x - 1;
}
}
count = max - 1;
}
i++;
}
if (tocandosuelo == 0) {
bajada = bajada + _root.gravedad;
this._y = this._y + bajada;
} else {
$salta = random(5);
bajada = -20;
this._y = this._y + bajada;
}
this._x = this._x - n;
count++;
if (count == max) {
if (this.lado == "izquierda") {
this.lado = "derecha";
} else {
this.lado = "izquierda";
}
count = 0;
n = -n;
this._xscale = -this._xscale;
}
if (this.hitTest(_root.sonic.pluton)) {
if (_root.sonic.estado == "saltando") {
misonidoa = new Sound();
misonidoa.attachSound("boink");
misonidoa.start();
_root.puntos = _root.puntos + puntos;
_root.sonic.rebota(20);
this.gotoAndStop(3);
} else {
_root.sonic.reset();
}
}
}
Instance of Symbol 817 MovieClip "cocodrilo1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
tocandosuelo = 0;
bajada = 2;
puntos = 30 + random(10);
max = 50;
distance = 300;
vel = 10;
this.estado = "andando";
this.direccion = "izquierda";
this.movimiento = 400 + random(100);
this.dist = this.movimiento;
this.muerdo = 0;
}
onClipEvent (enterFrame) {
tocandosuelo = 0;
this.tocandoyo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (this.hitTest(_root["plataforma2" + i])) {
tocandosuelo = 1;
}
if (this.izke.hitTest(_root["plataforma2" + i])) {
while (this.izke.hitTest(_root["plataforma2" + i])) {
if (this.direccion == "izquierda") {
this._x = this._x + 1;
} else {
this._x = this._x - 1;
}
}
this.tocandoyo = 1;
}
i++;
}
if (tocandosuelo == 0) {
bajada = bajada + _root.gravedad;
this._y = this._y + bajada;
} else {
bajada = 0;
}
personx = _root.sonic._x + (_root.sonic._width / 2);
thisx = this._x;
if (this.estado == "andando") {
this.direccion = "izquierda";
if (((thisx - personx) <= distance) && ((thisx - personx) >= 0)) {
if (this.tocandoyo != 1) {
this._x = this._x - vel;
muerdo = 1;
} else {
this.movimiento = 0;
}
} else if (this.tocandoyo != 1) {
this._x = this._x - vel;
this.movimiento = this.movimiento - vel;
muerdo = 0;
} else {
this.movimiento = 0;
}
if (this.movimiento <= 0) {
muerdo = 0;
this.estado = "andy";
this.movimiento = -this.dist;
this._xscale = -this._xscale;
this._x = this._x + this._width;
}
}
if (this.estado == "andy") {
this.direccion = "derecha";
if (((personx - thisx) <= distance) && ((personx - thisx) >= 0)) {
if (this.tocandoyo != 2) {
this._x = this._x + vel;
muerdo = 1;
} else {
this.movimiento = 0;
}
} else if (this.tocandoyo != 2) {
this._x = this._x + vel;
this.movimiento = this.movimiento + vel;
muerdo = 0;
} else {
this.movimiento = 0;
}
if (this.movimiento >= 0) {
muerdo = 0;
this.estado = "andando";
this.movimiento = this.dist;
this._xscale = -this._xscale;
this._x = this._x - this._width;
}
}
if (this.cocotoko.hitTest(_root.sonic.pluton)) {
if (_root.sonic.estado == "saltando") {
misonidoa = new Sound();
misonidoa.attachSound("boink");
misonidoa.start();
_root.puntos = _root.puntos + puntos;
_root.sonic.rebota(20);
this.gotoAndStop(26);
} else {
_root.sonic.reset();
}
}
}
Instance of Symbol 819 MovieClip "invisible1" in Symbol 1009 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = this._x - _root.movimiento;
}
Instance of Symbol 851 MovieClip "gordo1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
n = 4;
count = 0;
tocandosuelo = 0;
puntos = 35;
bajada = 2;
max = 30 + random(30);
}
onClipEvent (enterFrame) {
tocandosuelo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (this.hitTest(_root["plataforma2" + i])) {
tocandosuelo = 1;
}
i++;
}
if (tocandosuelo == 0) {
bajada = bajada + _root.gravedad;
this._y = this._y + bajada;
} else {
$salta = random(5);
if ($salta == 4) {
bajada = -20;
this._y = this._y + bajada;
} else {
bajada = 0;
}
}
this._x = this._x - n;
count++;
if (count == max) {
count = 0;
n = -n;
this._xscale = -this._xscale;
}
if (this.hitTest(_root.sonic.pluton)) {
if (_root.sonic.estado == "saltando") {
misonidoa = new Sound();
misonidoa.attachSound("boink");
misonidoa.start();
_root.puntos = _root.puntos + puntos;
_root.sonic.rebota(20);
this.gotoAndStop(14);
} else {
_root.sonic.reset();
}
}
}
Instance of Symbol 857 MovieClip "muelle1" in Symbol 1009 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sonic)) {
_root.sonic.rebota(30);
this.gotoAndPlay(2);
}
this._x = this._x - _root.movimiento;
}
Instance of Symbol 866 MovieClip "gusano1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
puntos = 50;
n = 4;
count = 0;
tocandosuelo = 0;
bajada = 2;
max = 50;
this.direccion = "izquierda";
if (this._xscale < 0) {
this._xscale = -this._xscale;
}
}
onClipEvent (enterFrame) {
tocandosuelo = 0;
this.tocandoyo = 0;
i = 1;
while (i <= _root.numplataformas) {
if (this.hitTest(_root.mundo["plataforma2" + i])) {
tocandosuelo = 1;
}
if (this.izke.hitTest(_root.mundo["plataforma2" + i])) {
while (this.izke.hitTest(_root.mundo["plataforma2" + i])) {
if (this.direccion == "izquierda") {
this._x = this._x + 1;
} else {
this._x = this._x - 1;
}
}
this.tocandoyo = 1;
}
i++;
}
if (tocandosuelo == 0) {
bajada = bajada + _root.gravedad;
this._y = this._y + bajada;
} else {
bajada = 0;
}
if (this.tocandoyo != "1") {
this._x = this._x - n;
} else {
count = max - 1;
}
count++;
if (count == max) {
count = 0;
n = -n;
this._xscale = -this._xscale;
if (this.direccion == "izquierda") {
this._x = this._x + this._width;
} else {
this._x = this._x - this._width;
}
if (this.direccion == "izquierda") {
this.direccion = "derecha";
} else {
this.direccion = "izquierda";
}
}
if (this.hitTest(_root.sonic)) {
if (_root.sonic.estado == "saltando") {
misonidoa = new Sound();
misonidoa.attachSound("flip");
misonidoa.start();
_root.puntos = _root.puntos + puntos;
_root.sonic.rebota(20);
this.gotoAndStop(13);
} else {
_root.sonic.reset();
}
}
}
Instance of Symbol 869 MovieClip "pincho1" in Symbol 1009 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sonic) && (_root.sonic.estado != "muerto")) {
_root.sonic.reset();
}
}
Instance of Symbol 874 MovieClip "rokaloka1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
n = 4;
count = 0;
max = 50;
start = 0;
}
onClipEvent (enterFrame) {
if (start == 0) {
rand = random(40);
if (rand == 5) {
start = 1;
}
} else {
if (this.hitTest(_root.sonic.pluton)) {
_root.sonic.reset();
}
this._x = this._x - n;
count++;
if (count == max) {
count = 0;
n = -n;
}
}
}
Instance of Symbol 883 MovieClip "calabaza1" in Symbol 1009 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sonic.pluton)) {
_root.sonic.reset();
}
}
Instance of Symbol 892 MovieClip "cangrejo1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
puntos = 25 + random(19);
n = 4;
vel = 3;
tocandosuelo = 0;
bajada = 2;
}
onClipEvent (enterFrame) {
tocandosuelo = 0;
this.tocandoder = 0;
this.tocandoizk = 0;
rando = Math.floor(Math.random() * 100) + 0;
if (rando < 20) {
vel = -vel;
}
this._x = this._x + vel;
i = 1;
while (i <= _root.numplataformas) {
if (this.toka.hitTest(_root["plataforma2" + i])) {
tocandosuelo = 1;
}
if (this.izke.hitTest(_root["plataforma2" + i])) {
while (this.izke.hitTest(_root["plataforma2" + i])) {
this._x = this._x + 1;
this.tocandoizk = 1;
}
}
if (this.dere.hitTest(_root["plataforma2" + i])) {
while (this.dere.hitTest(_root["plataforma2" + i])) {
this._x = this._x - 1;
this.tocandoder = 1;
}
}
i++;
}
if ((this.tocandoder == 1) || (this.tocandoizk == 1)) {
vel = -vel;
}
if (tocandosuelo == 0) {
bajada = bajada + _root.gravedad;
this._y = this._y + bajada;
} else {
bajada = 0;
}
if (this.toka.hitTest(_root.sonic.pluton)) {
if (_root.sonic.estado == "saltando") {
misonidoa = new Sound();
misonidoa.attachSound("boink");
misonidoa.start();
_root.puntos = _root.puntos + puntos;
_root.sonic.rebota(20);
this.gotoAndStop(10);
} else {
_root.sonic.reset();
}
}
}
Instance of Symbol 874 MovieClip "rokalokaarriba1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
n = 4;
count = 0;
max = 50;
start = 0;
}
onClipEvent (enterFrame) {
if (start == 0) {
rand = random(40);
if (rand == 5) {
start = 1;
}
} else {
if (this.hitTest(_root.sonic.pluton)) {
_root.sonic.reset();
}
this._y = this._y - n;
count++;
if (count == max) {
count = 0;
n = -n;
}
}
}
Instance of Symbol 919 MovieClip "mariquita1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
function recalculate() {
this.x_temporal = (this._x + this.bola1._x) + _root.decoracion._x;
this.y_temporal = (this._y + this.bola1._y) + _root.decoracion._y;
}
puntos = 60;
n = 10;
count = 0;
tocandosuelo = 0;
bajada = 2;
max = 20;
this.direccion = "izquierda";
this.estado = "normal";
this.xcorrect = this._width / 2;
this.ycorrect = this._height / 2;
}
onClipEvent (enterFrame) {
if (this.estado != "muerto") {
tocandosuelo = 0;
this.tocandoyo = 0;
recalculate();
if (_root.mundo.hitTest(this.x_temporal, this.y_temporal, true)) {
while (_root.mundo.hitTest(this.x_temporal, this.y_temporal, true)) {
this._y--;
recalculate();
}
tocandosuelo = 1;
}
this.tocandoyo = 0;
if (tocandosuelo == 0) {
bajada = bajada + _root.gravedad;
this._y = this._y + bajada;
} else {
bajada = 0;
}
if (this.tocandoyo != "1") {
this._x = this._x - n;
} else {
count = max - 1;
}
count++;
if (count == max) {
count = 0;
n = -n;
this._xscale = -this._xscale;
if (this.direccion == "izquierda") {
this._x = this._x + this._width;
} else {
this._x = this._x - this._width;
}
if (this.direccion == "izquierda") {
this.direccion = "derecha";
} else {
this.direccion = "izquierda";
}
}
if (this.tokker.hitTest(_root.sonic)) {
if (_root.sonic.atacando == "1") {
misonidoa = new Sound();
misonidoa.attachSound("flip");
misonidoa.start();
_root.puntos = _root.puntos + puntos;
if (_root.sonic.estado == "saltando") {
_root.sonic.rebota(20);
}
this.gotoAndStop(14);
this.estado = "muerto";
} else {
_root.sonic.reset();
}
}
}
}
Instance of Symbol 922 MovieClip "life1" in Symbol 1009 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sonic)) {
misonidoa = new Sound();
misonidoa.attachSound("tv");
misonidoa.start();
_root.vidas = _root.vidas + 1;
_root.sonic.rebota(20);
this.swapDepths(1);
this.removeMovieClip();
}
}
Instance of Symbol 925 MovieClip "burbuja1" in Symbol 1009 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sonic)) {
misonidoa = new Sound();
misonidoa.attachSound("tv");
misonidoa.start();
_root.sonic.burbu = 1;
_root.sonic.esfera1._alpha = 50;
_root.sonic.rebota(20);
this.swapDepths(1);
this.removeMovieClip();
}
}
Instance of Symbol 936 MovieClip "avispa1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
puntos = 60;
n = 10;
count = 0;
bajada = 2;
max = 30;
this.tocandoyo = 0;
this.direccion = "izquierda";
this.atacando = 0;
}
onClipEvent (enterFrame) {
xDest = _root.sonic._x + (_root.sonic._width / 2);
difx = Math.abs(this._x - xDest);
if (difx < 200) {
rando = Math.floor(Math.random() * 100) + 0;
if (rando < 3) {
this.atacando = 1;
}
}
if (this.atacando == 0) {
if (this.tocandoyo != "1") {
this._x = this._x - n;
} else {
count = max - 1;
}
count++;
if (count == max) {
count = 0;
n = -n;
this._xscale = -this._xscale;
if (this.direccion == "izquierda") {
this._x = this._x + this._width;
} else {
this._x = this._x - this._width;
}
if (this.direccion == "izquierda") {
this.direccion = "derecha";
} else {
this.direccion = "izquierda";
}
}
if (this.hitTest(_root.sonic.pluton)) {
if (_root.sonic.estado == "saltando") {
misonidoa = new Sound();
misonidoa.attachSound("flip");
misonidoa.start();
_root.puntos = _root.puntos + puntos;
_root.sonic.rebota(20);
this.gotoAndStop(12);
} else {
_root.sonic.reset();
}
}
}
}
Instance of Symbol 939 MovieClip "bala1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
xDest = _root.sonic._x + (_root.sonic._width / 2);
yDest = (_root.sonic._y + _root.sonic._height) - 20;
difx = this._x - xDest;
dify = this._y - yDest;
velx = difx / 12;
vely = dify / 12;
this.activo = 1;
}
onClipEvent (enterFrame) {
if (this._y < 0) {
this.activo = 0;
}
if (this.activo == 1) {
this._x = this._x - velx;
this._y = this._y - vely;
if (this.hitTest(_root.sonic.pluton)) {
_root.sonic.reset();
}
if ((((this._x < 0) || (this._x > 600)) || (this._y > 600)) || (this._y < -100)) {
this.swapDepths(1);
this.removeMovieClip();
}
}
}
Instance of Symbol 939 MovieClip "bala1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
xDest = _root.sonic._x + (_root.sonic._width / 2);
yDest = (_root.sonic._y + _root.sonic._height) - 20;
difx = this._x - xDest;
dify = this._y - yDest;
velx = difx / 12;
vely = dify / 12;
this.activo = 1;
}
onClipEvent (enterFrame) {
if (this._y < 0) {
this.activo = 0;
}
if (this.activo == 1) {
this._x = this._x - velx;
this._y = this._y - vely;
if (this.hitTest(_root.sonic.pluton)) {
_root.sonic.reset();
}
if ((((this._x < 0) || (this._x > 600)) || (this._y > 600)) || (this._y < -100)) {
this.swapDepths(1);
this.removeMovieClip();
}
}
}
Instance of Symbol 948 MovieClip "final1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
this.espri = 0;
}
onClipEvent (enterFrame) {
if (this.espri == 0) {
if (this.hitTest(_root.sonic)) {
this.espri = 1;
misonidoa = new Sound();
misonidoa.attachSound("final");
misonidoa.start();
this.play();
}
}
this.x = this._x;
this.y = this._y;
}
Instance of Symbol 974 MovieClip "eneflor1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
function recalculate() {
this.x_temporal = (this._x + this.bola1._x) + _root.decoracion._x;
this.y_temporal = (this._y + this.bola1._y) + _root.decoracion._y;
}
contador = 0;
puntos = 50;
n = 4 + random(3);
maxvel = 20 + random(3);
minvel = 2 + random(3);
count = 0;
tocandosuelo = 0;
bajada = 2;
max = 50 + random(10);
this.direccion = "izquierda";
if (this._xscale < 0) {
this._xscale = -this._xscale;
}
}
onClipEvent (enterFrame) {
if (this.estado != "muerto") {
contador++;
tocandosuelo = 0;
this.tocandoyo = 0;
recalculate();
if (_root.mundo.hitTest(this.x_temporal, this.y_temporal, true)) {
while (_root.mundo.hitTest(this.x_temporal, this.y_temporal, true)) {
this._y--;
recalculate();
}
tocandosuelo = 1;
}
this.tocandoyo = 0;
if (tocandosuelo == 0) {
bajada = bajada + _root.gravedad;
this._y = this._y + bajada;
} else {
bajada = 0;
}
if (this.tocandoyo != "1") {
this._x = this._x - n;
} else {
count = max - 1;
}
count++;
if (count == max) {
count = 0;
if (n > 0) {
n = -maxvel;
} else {
n = maxvel;
}
this._xscale = -this._xscale;
if (this.direccion == "izquierda") {
}
if (this.direccion == "izquierda") {
this.direccion = "derecha";
} else {
this.direccion = "izquierda";
}
} else if (n > 0) {
if (n > minvel) {
n--;
}
} else if (n < (-minvel)) {
n++;
}
if (this.hitTest(_root.sonic)) {
if (_root.sonic.atacando == "1") {
misonidoa = new Sound();
misonidoa.attachSound("flip");
misonidoa.start();
_root.puntos = _root.puntos + puntos;
if (_root.sonic.estado == "saltando") {
_root.sonic.rebota(20);
}
this.gotoAndStop(15);
this.estado = "muerto";
} else {
_root.sonic.reset();
}
}
}
}
Instance of Symbol 979 MovieClip "eneflora1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
function recalculate() {
this.x_temporal = (this._x + this.bola1._x) + _root.decoracion._x;
this.y_temporal = (this._y + this.bola1._y) + _root.decoracion._y;
}
this.estado = "esperando";
distance = 150 + Math.random(50);
}
onClipEvent (enterFrame) {
distancia = Math.abs(_root.sonic._x - (this._x + _root.decoracion._x));
if (this.estado == "esperando") {
if (distancia <= distance) {
this.estado = "atacando";
this.gotoAndStop(2);
}
} else if (distancia > distance) {
this.estado = "esperando";
this.gotoAndStop(1);
}
if (this.hitTest(_root.sonic)) {
_root.sonic.reset();
}
}
Instance of Symbol 988 MovieClip "magneto1" in Symbol 1009 MovieClip Frame 1
onClipEvent (load) {
function recalculate() {
this.x_temporal = (this._x + this.bola1._x) + _root.decoracion._x;
this.y_temporal = (this._y + this.bola1._y) + _root.decoracion._y;
}
contador = 0;
puntos = 50;
n = 4;
count = 0;
tocandosuelo = 0;
bajada = 2;
max = 50;
this.direccion = "izquierda";
if (this._xscale < 0) {
this._xscale = -this._xscale;
}
this.x_temporal = 0;
this.y_temporal = 0;
}
onClipEvent (enterFrame) {
if (this.estado != "muerto") {
contador++;
tocandosuelo = 0;
this.tocandoyo = 0;
recalculate();
if (_root.mundo.hitTest(this.x_temporal, this.y_temporal, true)) {
while (_root.mundo.hitTest(this.x_temporal, this.y_temporal, true)) {
this._y--;
recalculate();
}
tocandosuelo = 1;
}
this.tocandoyo = 0;
if (tocandosuelo == 0) {
bajada = bajada + _root.gravedad;
this._y = this._y + bajada;
} else {
bajada = 0;
}
if (this.tocandoyo != "1") {
this._x = this._x - n;
} else {
count = max - 1;
}
count++;
if (count == max) {
count = 0;
n = -n;
this._xscale = -this._xscale;
if (this.direccion == "izquierda") {
}
if (this.direccion == "izquierda") {
this.direccion = "derecha";
} else {
this.direccion = "izquierda";
}
}
if (this.hitTest(_root.sonic)) {
if (_root.sonic.atacando == "1") {
misonidoa = new Sound();
misonidoa.attachSound("flip");
misonidoa.start();
_root.puntos = _root.puntos + puntos;
if (_root.sonic.estado == "saltando") {
_root.sonic.rebota(20);
}
this.gotoAndStop(5);
this.estado = "muerto";
} else {
_root.sonic.reset();
}
}
}
}
Instance of Symbol 997 MovieClip "moneda1" in Symbol 1009 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.sonic)) {
misonidoa = new Sound();
misonidoa.attachSound("moneda");
misonidoa.start();
_root.puntos = _root.puntos + 1;
_root.rings = _root.rings + 1;
this.swapDepths(1);
this.removeMovieClip();
}
}
Instance of Symbol 117 MovieClip in Symbol 1083 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.txt_vidas = "x " + _root.vidas;
_root.txt_level = "LEVEL: " + _root.nivel;
_root.txt_time = "TIME: " + _root.Restante;
_root.txt_score = "SCORE: " + _root.puntos;
_root.txt_rings = "RINGS: " + _root.rings;
}
Symbol 1105 MovieClip Frame 2
if ((estado == "dentro") && (lado == "izkierda")) {
gotoAndPlay (3);
} else if ((estado == "dentro") && (lado == "derecha")) {
gotoAndPlay (19);
} else {
gotoAndPlay (1);
}
Symbol 1105 MovieClip Frame 3
if (_root.sonic.burbu == 1) {
corre.esferita._alpha = 50;
}
Symbol 1105 MovieClip Frame 15
_root.sonic.muevete = 200;
Symbol 1105 MovieClip Frame 16
corre.esferita._alpha = 0;
estado = "esperando";
_root.sonic._visible = 1;
_root.sonic.muevete = 0;
_root.sonic.gira = 0;
if ((estado == "dentro") && (lado == "izkierda")) {
gotoAndPlay (3);
} else if ((estado == "dentro") && (lado == "derecha")) {
gotoAndPlay (19);
} else {
gotoAndPlay (1);
}
Symbol 1105 MovieClip Frame 17
stop();
Symbol 1105 MovieClip Frame 18
if (_root.sonic.burbu == 1) {
corre.esferita._alpha = 50;
}
Symbol 1105 MovieClip Frame 19
if (_root.sonic.burbu == 1) {
corre.esferita._alpha = 50;
}
Symbol 1105 MovieClip Frame 34
_root.sonic.muevete = -200;
Symbol 1105 MovieClip Frame 35
corre.esferita._alpha = 0;
estado = "esperando";
_root.sonic.muevete = 0;
_root.sonic._visible = 1;
_root.sonic.gira = 0;
if ((estado == "dentro") && (lado == "izkierda")) {
gotoAndPlay (3);
} else if ((estado == "dentro") && (lado == "derecha")) {
gotoAndPlay (19);
} else {
gotoAndPlay (1);
}
Symbol 1111 Button
on (release) {
_root.gotoAndPlay(_root.siguiente);
}
Symbol 1115 Button
on (release) {
mi_so = SharedObject.getLocal("sonic");
mi_so.data.person = person;
mi_so.data.frame = frame;
mi_so.data.lifes = lifes;
mi_so.data.score = score;
mi_so.data.rings = rings;
mi_so.data.completer = completer;
mi_so.flush();
play();
}
Symbol 1119 MovieClip Frame 1
_root.sonic._y = -992500;
Symbol 1119 MovieClip Frame 19
txt_level = "LEVEL: " + (_root.nivel - 1);
txt_time = "TIME: " + _root.Restante;
txt_score = "SCORE: " + _root.puntos;
stop();
Symbol 1119 MovieClip Frame 30
_root.gotoAndPlay(_root.siguiente);