Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("e4e287bf", this, 10301, true);
var ruta = "http://www.allonline.es/DarkRaces/";
System.security.loadPolicyFile("https://www.mochiads.com/crossdomain.xml");
MochiAd.showPreGameAd({id:"515e607b8c28e089", res:"700x400", background:16777215, color:3364058, outline:405634, no_bg:true});
Frame 2
mensaje_mc._visible = false;
gotoAndStop (4);
Frame 4
stop();
Frame 5
gotoAndStop(_currentframe + 1);
Frame 6
function cambiarMusica(num) {
playMus.stop();
playMus2.stop();
playMus3.stop();
playMus4.stop();
switch (num) {
case 0 :
playMus.start(0, 1000);
break;
case 1 :
playMus2.start(0, 1000);
break;
case 2 :
playMus3.start(0, 1000);
break;
case 3 :
playMus4.start(0, 1000);
}
}
function sonidoAct(bool) {
if (bool) {
playMus.setVolume(100);
} else {
playMus.setVolume(0);
}
}
function enviar(t1, t2, t3) {
puntuacion = t2;
enviarRecord();
}
function enviarRecord() {
conn.send("_AORed", "enviarR", id_juego, puntuacion);
}
function menuHandler(obj, menuObj) {
if (showItem == false) {
menuObj.customItems[0].enabled = false;
} else {
menuObj.customItems[0].enabled = true;
}
}
function itemHandler(obj, item) {
getURL ("http://www.allonline.es/", "_blank");
}
stop();
var id_juego = 105;
var puntuacion = 0;
var conn = new LocalConnection();
idioma = "en";
var playsnd = new Sound();
playsnd.attachSound("snd_blupb");
var playsnd2 = new Sound();
playsnd2.attachSound("snd_muerte");
var playsnd3 = new Sound();
playsnd3.attachSound("snd_bola");
var playsnd4 = new Sound();
playsnd4.attachSound("snd_bomba");
var playsnd5 = new Sound();
playsnd5.attachSound("snd_explosion");
var playsnd6 = new Sound();
playsnd6.attachSound("snd_vida");
var playsnd7 = new Sound();
playsnd7.attachSound("snd_bolaa");
var playMus = new Sound();
playMus.attachSound("musica");
var playMus2 = new Sound();
playMus2.attachSound("musica2");
var playMus3 = new Sound();
playMus3.attachSound("musica3");
var playMus4 = new Sound();
playMus4.attachSound("musica4");
playMus.stop();
playMus.start(0, 1000);
salir_mc.onRelease = function () {
juego_mc.pausa = true;
juego_mc.mensaje_txt._visible = false;
menu_mc.mascara_mc.gotoAndPlay(31);
menu_mc._visible = true;
};
var showItem = true;
var my_cm = new ContextMenu(menuHandler);
my_cm.hideBuiltInItems();
my_cm.customItems.push(new ContextMenuItem("All Online", itemHandler));
this.menu = my_cm;
Symbol 12 MovieClip [sonini_mc] Frame 1
stop();
onRelease = function () {
if (_currentframe == 1) {
_parent.sonidoAct(false);
gotoAndStop (2);
} else {
_parent.sonidoAct(true);
gotoAndStop (1);
}
};
Symbol 12 MovieClip [sonini_mc] Frame 2
stop();
Symbol 207 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 22 MovieClip Frame 1
stop();
onRollOver = function () {
gotoAndStop (2);
};
onDragOver = function () {
gotoAndStop (2);
};
onRollOut = function () {
gotoAndStop (1);
};
onDragOut = function () {
gotoAndStop (1);
};
onRelease = function () {
getURL ("http://www.allonline.es/DarkRaces", "_blank");
};
Symbol 31 MovieClip [colision] Frame 1
_parent._parent._parent.playsnd.start();
Symbol 31 MovieClip [colision] Frame 11
this.removeMovieClip();
Symbol 86 MovieClip Frame 1
stop();
Symbol 87 MovieClip [objeto] Frame 1
onEnterFrame = function () {
if ((_parent._parent.pausa == true) || (_parent._parent.dir == 0)) {
stop();
} else {
play();
}
};
Symbol 87 MovieClip [objeto] Frame 116
_parent._parent.generarObjeto(Number(this._name));
Symbol 100 MovieClip Frame 8
_parent._parent.partirMuro(_parent._x, _parent._y);
_parent.removeMovieClip();
Symbol 101 MovieClip [booomba] Frame 1
_parent._parent.playsnd4.start();
Symbol 101 MovieClip [booomba] Frame 25
_parent._parent.playsnd4.start();
Symbol 101 MovieClip [booomba] Frame 50
_parent._parent.playsnd4.start();
Symbol 101 MovieClip [booomba] Frame 76
_parent._parent.playsnd5.start();
stop();
Symbol 112 MovieClip Frame 65
_parent.gotoAndStop(_parent._currentframe + 1);
Symbol 119 MovieClip Frame 1
gotoAndStop (1);
Symbol 121 MovieClip Frame 1
function borrarSerpiente() {
objeto = "";
colision = false;
mov.splice(0, mov.length);
i = 0;
while (i < ele) {
this[i].removeMovieClip();
i++;
}
}
function choque() {
aux = false;
i = 1;
while (i < ele) {
if ((this[i]._x == this[0]._x) && (this[i]._y == this[0]._y)) {
aux = true;
break;
}
i++;
}
return(aux);
}
function crearSerpiente() {
borrarSerpiente();
color = colores.split(",");
i = 0;
while (i < ele) {
attachMovie("serpiente_bola", i, i);
this[i]._x = (-ancho) * i;
this[i].gotoAndStop(Number(color[i]));
i++;
}
}
function moverIzquierda() {
if (colision) {
gestionarColision();
} else {
if (mov.length == 0) {
i = ele;
while (i >= 1) {
mov[i] = (this[i - 1]._x + ",") + this[i - 1]._y;
i--;
}
mov[0] = ((this[0]._x - ancho) + ",") + this[0]._y;
}
i = 0;
while (i < ele) {
aux = mov[i].split(",");
if (this[i]._y < aux[1]) {
this[i]._y = this[i]._y + vel;
}
if (this[i]._y > aux[1]) {
this[i]._y = this[i]._y - vel;
}
if (this[i]._x < aux[0]) {
this[i]._x = this[i]._x + vel;
}
if (this[i]._x > aux[0]) {
this[i]._x = this[i]._x - vel;
}
i++;
}
if (ele == 0) {
aux = mov[0].split(",");
if (this[0]._y < aux[1]) {
this[0]._y = this[0]._y + vel;
}
if (this[0]._y > aux[1]) {
this[0]._y = this[0]._y - vel;
}
if (this[0]._x < aux[0]) {
this[0]._x = this[0]._x + vel;
}
if (this[0]._x > aux[0]) {
this[0]._x = this[0]._x - vel;
}
}
if ((mov[0].split(",")[0] == this[0]._x) && (mov[0].split(",")[1] == this[0]._y)) {
mov.splice(0, mov.length);
}
_parent._x = -this[0]._x;
_parent._y = -this[0]._y;
_parent.comprobarColision();
obj = _parent.comprobarColisionObj();
if (obj != "") {
objeto = obj;
colision = true;
}
}
if (_parent.dir != 0) {
_parent.cabeza_mc._x = (_x + this[0]._x) - 12;
_parent.cabeza_mc._y = _y + this[0]._y;
_parent.cabeza_mc.gotoAndStop(4);
}
auxa = _parent.nivel[_parent.nnivel].puerta.split(",")[0];
auxb = Number(_parent.nivel[_parent.nnivel].puerta.split(",")[1]);
if (((((this[0]._x + _x) == auxa) && ((this[0]._y + _y) >= auxb)) && ((this[0]._y + _y) <= (auxb + 30))) && (ele == 0)) {
mov.splice(0, mov.length);
_parent.dir = 0;
_parent.cambiarNivel();
}
auxa = _parent.nivel[_parent.nnivel].agujero.split(";")[0].split(",")[0];
auxa2 = _parent.nivel[_parent.nnivel].agujero.split(";")[0].split(",")[1];
auxb = _parent.nivel[_parent.nnivel].agujero.split(";")[1].split(",")[0];
auxb2 = _parent.nivel[_parent.nnivel].agujero.split(";")[1].split(",")[1];
if (((this[0]._x + _x) == auxa) && ((this[0]._y + _y) == auxa2)) {
mov.splice(0, mov.length);
i = 0;
while (i <= ele) {
this[i]._x = ((ancho * i) + Number(auxb)) - _x;
this[i]._y = Number(auxb2) - _y;
i++;
}
} else if (((this[0]._x + _x) == auxb) && ((this[0]._y + _y) == auxb2)) {
mov.splice(0, mov.length);
i = 0;
while (i <= ele) {
this[i]._x = ((ancho * i) + Number(auxa)) - _x;
this[i]._y = Number(auxa2) - _y;
i++;
}
}
}
function moverDerecha() {
if (colision) {
gestionarColision();
} else {
if (mov.length == 0) {
i = ele;
while (i >= 1) {
mov[i] = (this[i - 1]._x + ",") + this[i - 1]._y;
i--;
}
mov[0] = ((this[0]._x + ancho) + ",") + this[0]._y;
}
i = 0;
while (i < ele) {
aux = mov[i].split(",");
if (this[i]._y < aux[1]) {
this[i]._y = this[i]._y + vel;
}
if (this[i]._y > aux[1]) {
this[i]._y = this[i]._y - vel;
}
if (this[i]._x < aux[0]) {
this[i]._x = this[i]._x + vel;
}
if (this[i]._x > aux[0]) {
this[i]._x = this[i]._x - vel;
}
i++;
}
if (ele == 0) {
aux = mov[0].split(",");
if (this[0]._y < aux[1]) {
this[0]._y = this[0]._y + vel;
}
if (this[0]._y > aux[1]) {
this[0]._y = this[0]._y - vel;
}
if (this[0]._x < aux[0]) {
this[0]._x = this[0]._x + vel;
}
if (this[0]._x > aux[0]) {
this[0]._x = this[0]._x - vel;
}
}
if ((mov[0].split(",")[0] == this[0]._x) && (mov[0].split(",")[1] == this[0]._y)) {
mov.splice(0, mov.length);
}
_parent._x = -this[0]._x;
_parent._y = -this[0]._y;
_parent.comprobarColision();
obj = _parent.comprobarColisionObj();
if (obj != "") {
objeto = obj;
colision = true;
}
}
if (_parent.dir != 0) {
_parent.cabeza_mc._x = (_x + this[0]._x) + 12;
_parent.cabeza_mc._y = _y + this[0]._y;
_parent.cabeza_mc.gotoAndStop(3);
}
auxa = _parent.nivel[_parent.nnivel].puerta.split(",")[0];
auxb = Number(_parent.nivel[_parent.nnivel].puerta.split(",")[1]);
if (((((this[0]._x + _x) == auxa) && ((this[0]._y + _y) >= auxb)) && ((this[0]._y + _y) <= (auxb + 30))) && (ele == 0)) {
mov.splice(0, mov.length);
_parent.dir = 0;
_parent.cambiarNivel();
}
auxa = _parent.nivel[_parent.nnivel].agujero.split(";")[0].split(",")[0];
auxa2 = _parent.nivel[_parent.nnivel].agujero.split(";")[0].split(",")[1];
auxb = _parent.nivel[_parent.nnivel].agujero.split(";")[1].split(",")[0];
auxb2 = _parent.nivel[_parent.nnivel].agujero.split(";")[1].split(",")[1];
if (((this[0]._x + _x) == auxa) && ((this[0]._y + _y) == auxa2)) {
mov.splice(0, mov.length);
i = 0;
while (i <= ele) {
this[i]._x = (((-ancho) * i) + Number(auxb)) - _x;
this[i]._y = Number(auxb2) - _y;
i++;
}
} else if (((this[0]._x + _x) == auxb) && ((this[0]._y + _y) == auxb2)) {
mov.splice(0, mov.length);
i = 0;
while (i <= ele) {
this[i]._x = (((-ancho) * i) + Number(auxa)) - _x;
this[i]._y = Number(auxa2) - _y;
i++;
}
}
}
function moverAbajo() {
if (colision) {
gestionarColision();
} else {
if (mov.length == 0) {
i = ele;
while (i >= 1) {
mov[i] = (this[i - 1]._x + ",") + this[i - 1]._y;
i--;
}
mov[0] = (this[0]._x + ",") + (this[0]._y + ancho);
}
i = 0;
while (i < ele) {
aux = mov[i].split(",");
if (this[i]._y < aux[1]) {
this[i]._y = this[i]._y + vel;
}
if (this[i]._y > aux[1]) {
this[i]._y = this[i]._y - vel;
}
if (this[i]._x < aux[0]) {
this[i]._x = this[i]._x + vel;
}
if (this[i]._x > aux[0]) {
this[i]._x = this[i]._x - vel;
}
i++;
}
if (ele == 0) {
aux = mov[0].split(",");
if (this[0]._y < aux[1]) {
this[0]._y = this[0]._y + vel;
}
if (this[0]._y > aux[1]) {
this[0]._y = this[0]._y - vel;
}
if (this[0]._x < aux[0]) {
this[0]._x = this[0]._x + vel;
}
if (this[0]._x > aux[0]) {
this[0]._x = this[0]._x - vel;
}
}
if ((mov[0].split(",")[0] == this[0]._x) && (mov[0].split(",")[1] == this[0]._y)) {
mov.splice(0, mov.length);
}
_parent._x = -this[0]._x;
_parent._y = -this[0]._y;
_parent.comprobarColision();
obj = _parent.comprobarColisionObj();
if (obj != "") {
objeto = obj;
colision = true;
}
}
if (_parent.dir != 0) {
_parent.cabeza_mc._x = _x + this[0]._x;
_parent.cabeza_mc._y = (_y + this[0]._y) + 12;
_parent.cabeza_mc.gotoAndStop(1);
}
auxa = _parent.nivel[_parent.nnivel].puerta.split(",")[0];
auxb = Number(_parent.nivel[_parent.nnivel].puerta.split(",")[1]);
if (((((this[0]._x + _x) == auxa) && ((this[0]._y + _y) >= auxb)) && ((this[0]._y + _y) <= (auxb + 30))) && (ele == 0)) {
mov.splice(0, mov.length);
_parent.dir = 0;
_parent.cambiarNivel();
}
auxa = _parent.nivel[_parent.nnivel].agujero.split(";")[0].split(",")[0];
auxa2 = _parent.nivel[_parent.nnivel].agujero.split(";")[0].split(",")[1];
auxb = _parent.nivel[_parent.nnivel].agujero.split(";")[1].split(",")[0];
auxb2 = _parent.nivel[_parent.nnivel].agujero.split(";")[1].split(",")[1];
if (((this[0]._x + _x) == auxa) && ((this[0]._y + _y) == auxa2)) {
mov.splice(0, mov.length);
i = 0;
while (i <= ele) {
this[i]._x = (((-ancho) * i) + Number(auxb)) - _x;
this[i]._y = Number(auxb2) - _y;
i++;
}
} else if (((this[0]._x + _x) == auxb) && ((this[0]._y + _y) == auxb2)) {
mov.splice(0, mov.length);
i = 0;
while (i <= ele) {
this[i]._x = (((-ancho) * i) + Number(auxa)) - _x;
this[i]._y = Number(auxa2) - _y;
i++;
}
}
}
function moverArriba() {
if (colision) {
gestionarColision();
} else {
if (mov.length == 0) {
i = ele;
while (i >= 1) {
mov[i] = (this[i - 1]._x + ",") + this[i - 1]._y;
i--;
}
mov[0] = (this[0]._x + ",") + (this[0]._y - ancho);
}
i = 0;
while (i < ele) {
aux = mov[i].split(",");
if (this[i]._y < aux[1]) {
this[i]._y = this[i]._y + vel;
}
if (this[i]._y > aux[1]) {
this[i]._y = this[i]._y - vel;
}
if (this[i]._x < aux[0]) {
this[i]._x = this[i]._x + vel;
}
if (this[i]._x > aux[0]) {
this[i]._x = this[i]._x - vel;
}
i++;
}
if (ele == 0) {
aux = mov[0].split(",");
if (this[0]._y < aux[1]) {
this[0]._y = this[0]._y + vel;
}
if (this[0]._y > aux[1]) {
this[0]._y = this[0]._y - vel;
}
if (this[0]._x < aux[0]) {
this[0]._x = this[0]._x + vel;
}
if (this[0]._x > aux[0]) {
this[0]._x = this[0]._x - vel;
}
}
if ((mov[0].split(",")[0] == this[0]._x) && (mov[0].split(",")[1] == this[0]._y)) {
mov.splice(0, mov.length);
}
_parent._x = -this[0]._x;
_parent._y = -this[0]._y;
_parent.comprobarColision();
obj = _parent.comprobarColisionObj();
if (obj != "") {
objeto = obj;
colision = true;
}
}
if (_parent.dir != 0) {
_parent.cabeza_mc._x = _x + this[0]._x;
_parent.cabeza_mc._y = (_y + this[0]._y) - 12;
_parent.cabeza_mc.gotoAndStop(2);
}
auxa = _parent.nivel[_parent.nnivel].puerta.split(",")[0];
auxb = Number(_parent.nivel[_parent.nnivel].puerta.split(",")[1]);
if (((((this[0]._x + _x) == auxa) && ((this[0]._y + _y) >= auxb)) && ((this[0]._y + _y) <= (auxb + 30))) && (ele == 0)) {
mov.splice(0, mov.length);
_parent.dir = 0;
_parent.cambiarNivel();
}
auxa = _parent.nivel[_parent.nnivel].agujero.split(";")[0].split(",")[0];
auxa2 = _parent.nivel[_parent.nnivel].agujero.split(";")[0].split(",")[1];
auxb = _parent.nivel[_parent.nnivel].agujero.split(";")[1].split(",")[0];
auxb2 = _parent.nivel[_parent.nnivel].agujero.split(";")[1].split(",")[1];
if (((this[0]._x + _x) == auxa) && ((this[0]._y + _y) == auxa2)) {
mov.splice(0, mov.length);
i = 0;
while (i <= ele) {
this[i]._x = (((-ancho) * i) + Number(auxb)) - _x;
this[i]._y = Number(auxb2) - _y;
i++;
}
} else if (((this[0]._x + _x) == auxb) && ((this[0]._y + _y) == auxb2)) {
mov.splice(0, mov.length);
i = 0;
while (i <= ele) {
this[i]._x = (((-ancho) * i) + Number(auxa)) - _x;
this[i]._y = Number(auxa2) - _y;
i++;
}
}
}
function gestionarColision() {
posicx = this[0]._x;
posicy = this[0]._y;
if (_parent._parent.info_mc.parpadeante_mc._visible && (Number(objeto) <= _parent.nbolas)) {
objeto = Number(objeto) + 9;
}
if ((Number(objeto) >= 10) && (Number(objeto) <= 17)) {
_parent._parent.playsnd7.start();
}
if (Number(objeto) <= _parent.nbolas) {
aux = colores.split(",");
if (Number(objeto) == this[0]._currentframe) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto));
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto));
_parent.efectos_mc[prof]._x = _x + this[0]._x;
_parent.efectos_mc[prof]._y = _y + this[0]._y;
aux.splice(0, 1);
i = 0;
while (i < (ele - 1)) {
this[i].gotoAndStop(Number(aux[i]));
i++;
}
this[ele - 1].removeMovieClip();
ele--;
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
} else if (Number(objeto) == this[ele - 1]._currentframe) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto));
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto));
_parent.efectos_mc[prof]._x = _x + this[ele - 1]._x;
_parent.efectos_mc[prof]._y = _y + this[ele - 1]._y;
aux.splice(aux.length - 1, 1);
i = 0;
while (i < (ele - 1)) {
this[i].gotoAndStop(Number(aux[i]));
i++;
}
this[ele - 1].removeMovieClip();
ele--;
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
} else {
_parent._parent.playsnd3.start();
attachMovie("serpiente_bola", ele, ele);
if (_parent.dir != 1) {
if (ele > 0) {
this[ele]._x = this[ele - 1]._x - ancho;
this[ele]._y = this[ele - 1]._y;
} else {
this[ele]._x = posicx;
this[ele]._y = posicy;
}
} else if (ele > 0) {
this[ele]._x = this[ele - 1]._x + ancho;
this[ele]._y = this[ele - 1]._y;
} else {
this[ele]._x = posicx;
this[ele]._y = posicy;
}
this[ele].gotoAndStop(Number(objeto));
ele++;
aux.push(objeto);
}
if (aux[0] == "") {
aux.splice(0, 1);
}
colores = aux.join(",");
} else {
switch (Number(objeto)) {
case 9 :
_parent.nbombas++;
break;
case 10 :
_parent._parent.playsnd3.start();
aux = colores.split(",");
i = 0;
while (i < ele) {
if (aux[i] == (Number(objeto) - 9)) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof]._x = _x + this[i]._x;
_parent.efectos_mc[prof]._y = _y + this[i]._y;
aux.splice(i, 1);
j = 0;
while (j < (ele - 1)) {
this[j].gotoAndStop(Number(aux[j]));
j++;
}
this[ele - 1].removeMovieClip();
i--;
ele--;
}
i++;
}
colores = aux.join(",");
break;
case 11 :
_parent._parent.playsnd3.start();
aux = colores.split(",");
i = 0;
while (i < ele) {
if (aux[i] == (Number(objeto) - 9)) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof]._x = _x + this[i]._x;
_parent.efectos_mc[prof]._y = _y + this[i]._y;
aux.splice(i, 1);
j = 0;
while (j < (ele - 1)) {
this[j].gotoAndStop(Number(aux[j]));
j++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
i--;
ele--;
}
i++;
}
colores = aux.join(",");
break;
case 12 :
_parent._parent.playsnd3.start();
aux = colores.split(",");
i = 0;
while (i < ele) {
if (aux[i] == (Number(objeto) - 9)) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof]._x = _x + this[i]._x;
_parent.efectos_mc[prof]._y = _y + this[i]._y;
aux.splice(i, 1);
j = 0;
while (j < (ele - 1)) {
this[j].gotoAndStop(Number(aux[j]));
j++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
i--;
ele--;
}
i++;
}
colores = aux.join(",");
break;
case 13 :
_parent._parent.playsnd3.start();
aux = colores.split(",");
i = 0;
while (i < ele) {
if (aux[i] == (Number(objeto) - 9)) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof]._x = _x + this[i]._x;
_parent.efectos_mc[prof]._y = _y + this[i]._y;
aux.splice(i, 1);
j = 0;
while (j < (ele - 1)) {
this[j].gotoAndStop(Number(aux[j]));
j++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
i--;
ele--;
}
i++;
}
colores = aux.join(",");
break;
case 14 :
_parent._parent.playsnd3.start();
aux = colores.split(",");
i = 0;
while (i < ele) {
if (aux[i] == (Number(objeto) - 9)) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof]._x = _x + this[i]._x;
_parent.efectos_mc[prof]._y = _y + this[i]._y;
aux.splice(i, 1);
j = 0;
while (j < (ele - 1)) {
this[j].gotoAndStop(Number(aux[j]));
j++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
i--;
ele--;
}
i++;
}
colores = aux.join(",");
break;
case 15 :
_parent._parent.playsnd3.start();
aux = colores.split(",");
i = 0;
while (i < ele) {
if (aux[i] == (Number(objeto) - 9)) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof]._x = _x + this[i]._x;
_parent.efectos_mc[prof]._y = _y + this[i]._y;
aux.splice(i, 1);
j = 0;
while (j < (ele - 1)) {
this[j].gotoAndStop(Number(aux[j]));
j++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
i--;
ele--;
}
i++;
}
colores = aux.join(",");
break;
case 16 :
_parent._parent.playsnd3.start();
aux = colores.split(",");
i = 0;
while (i < ele) {
if (aux[i] == (Number(objeto) - 9)) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof]._x = _x + this[i]._x;
_parent.efectos_mc[prof]._y = _y + this[i]._y;
aux.splice(i, 1);
j = 0;
while (j < (ele - 1)) {
this[j].gotoAndStop(Number(aux[j]));
j++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
i--;
ele--;
}
i++;
}
colores = aux.join(",");
break;
case 17 :
_parent._parent.playsnd3.start();
aux = colores.split(",");
i = 0;
while (i < ele) {
if (aux[i] == (Number(objeto) - 9)) {
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(Number(objeto) - 9);
_parent.efectos_mc[prof]._x = _x + this[i]._x;
_parent.efectos_mc[prof]._y = _y + this[i]._y;
aux.splice(i, 1);
j = 0;
while (j < (ele - 1)) {
this[j].gotoAndStop(Number(aux[j]));
j++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
i--;
ele--;
}
i++;
}
colores = aux.join(",");
break;
case 18 :
_parent._parent.playsnd3.start();
if (ele > 0) {
aux = colores.split(",");
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(this[0]._currentframe);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(this[0]._currentframe);
_parent.efectos_mc[prof]._x = _x + this[0]._x;
_parent.efectos_mc[prof]._y = _y + this[0]._y;
aux.splice(0, 1);
i = 0;
while (i < (ele - 1)) {
this[i].gotoAndStop(Number(aux[i]));
i++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
ele--;
colores = aux.join(",");
}
if (ele > 0) {
aux = colores.split(",");
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(this[0]._currentframe);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(this[0]._currentframe);
_parent.efectos_mc[prof]._x = _x + this[0]._x;
_parent.efectos_mc[prof]._y = _y + this[0]._y;
aux.splice(0, 1);
i = 0;
while (i < (ele - 1)) {
this[i].gotoAndStop(Number(aux[i]));
i++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
ele--;
colores = aux.join(",");
}
if (ele > 0) {
aux = colores.split(",");
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(this[0]._currentframe);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(this[0]._currentframe);
_parent.efectos_mc[prof]._x = _x + this[0]._x;
_parent.efectos_mc[prof]._y = _y + this[0]._y;
aux.splice(0, 1);
i = 0;
while (i < (ele - 1)) {
this[i].gotoAndStop(Number(aux[i]));
i++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
ele--;
colores = aux.join(",");
}
break;
case 19 :
if (ele > 0) {
_parent._parent.playsnd3.start();
_parent._parent.info_mc.parpadeante_mc._visible = true;
}
break;
case 20 :
_parent._parent.playsnd6.start();
_parent.vidas++;
_parent.vidac = true;
break;
case 21 :
_parent._parent.playsnd2.start();
_parent._parent.muerte_mc._visible = true;
_parent._parent.muerte_mc.gotoAndPlay(1);
_parent.dir = 0;
_parent.pausa = true;
_parent.muerte = true;
_parent.cabeza_mc.play();
break;
case 22 :
_parent._parent.playsnd3.start();
auxb = Math.ceil(_parent.nbolas * Math.random());
this[0].gotoAndStop(auxb);
aux = colores.split(",");
aux.splice(0, 1, auxb);
colores = aux.join(",");
break;
case 23 :
_parent._parent.playsnd3.start();
var _local3 = new Array();
i = 0;
for(;;){
if (i >= ele) {
break;
}
_local3[i] = Math.ceil(_parent.nbolas * Math.random());
this[i].gotoAndStop(_local3[i]);
colores = _local3.join(",");
i++;
};
}
}
if (ele > 1) {
while (comprobar) {
comprobar = false;
j = 1;
while (j < ele) {
if ((this[j]._currentframe == this[j - 1]._currentframe) && (this[j]._currentframe == this[j + 1]._currentframe)) {
aux = colores.split(",");
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(this[j]._currentframe);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(this[j]._currentframe);
_parent.efectos_mc[prof]._x = _x + this[j]._x;
_parent.efectos_mc[prof]._y = _y + this[j]._y;
aux.splice(j, 1);
i = 0;
while (i < (ele - 1)) {
this[i].gotoAndStop(Number(aux[i]));
i++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
ele--;
colores = aux.join(",");
comprobar = true;
break;
}
if (this[j]._currentframe == this[j - 1]._currentframe) {
aux = colores.split(",");
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(this[j]._currentframe);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(this[j]._currentframe);
_parent.efectos_mc[prof]._x = _x + this[j]._x;
_parent.efectos_mc[prof]._y = _y + this[j]._y;
aux.splice(j, 1);
i = 0;
while (i < (ele - 1)) {
this[i].gotoAndStop(Number(aux[i]));
i++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
ele--;
colores = aux.join(",");
aux = colores.split(",");
prof = _parent.efectos_mc.getNextHighestDepth();
_parent.efectos_mc.attachMovie("colision", prof, prof);
_parent.efectos_mc[prof].bola1_mc.gotoAndStop(this[j - 1]._currentframe);
_parent.efectos_mc[prof].bola2_mc.gotoAndStop(this[j - 1]._currentframe);
_parent.efectos_mc[prof]._x = _x + this[j - 1]._x;
_parent.efectos_mc[prof]._y = _y + this[j - 1]._y;
aux.splice(j - 1, 1);
i = 0;
while (i < (ele - 1)) {
this[i].gotoAndStop(Number(aux[i]));
i++;
}
this[ele - 1].removeMovieClip();
_parent.puntos = _parent.puntos + (_parent.nnivel + 1);
ele--;
colores = aux.join(",");
comprobar = true;
break;
}
j++;
}
}
}
if (ele == 0) {
attachMovie("serpiente_bola", 0, 0);
this[0]._x = posicx;
this[0]._y = posicy;
this[0].gotoAndStop(9);
}
if (Number(objeto) < 19) {
_parent._parent.info_mc.parpadeante_mc._visible = false;
}
colision = false;
comprobar = true;
objeto = "";
}
var ele = 10;
var colores = "1,2,1,3,4,2,5,3,6,7";
var ancho = 20;
var vel = 10;
var colision = false;
var objeto = "";
var mov = new Array();
_parent.ponerNivel(_parent.nnivel);
Symbol 137 MovieClip Frame 1
function generarObjetosIntervalo() {
generarObjetos();
clearInterval(intervalObjetos);
}
function cambiarNivel() {
ponerNivel(nnivel + 1);
}
function mostrarInfo() {
if (_parent.idioma == "es") {
_parent.info_mc.texto_txt.text = ((((((("Nivel " + (nnivel + 1)) + "\nC\u00F3digo: ") + co[nnivel]) + "\nPuntos: ") + puntos) + "\nTiempo: ") + tiempo) + "s";
} else {
_parent.info_mc.texto_txt.text = ((((((("Level " + (nnivel + 1)) + "\nCode: ") + co[nnivel]) + "\nPoints: ") + puntos) + "\nTime: ") + tiempo) + "s";
}
_parent.info_mc.nv_txt.text = "x" + vidas;
_parent.info_mc.nb_txt.text = "x" + nbombas;
}
function ponerNivel(aux) {
vidac = false;
_parent.cambiarMusica(aux % 4);
_parent.muerte_mc._visible = false;
_parent.muerte_mc.gotoAndStop(1);
i = 0;
while (i < this.getNextHighestDepth()) {
this[i].removeMovieClip();
i++;
}
if (_parent.idioma == "es") {
_parent.salir_mc.texto = "Salir";
} else {
_parent.salir_mc.texto = "Exit";
}
poratras_mc[0].removeMovieClip();
poratras_mc[1].removeMovieClip();
poratras_mc[2].removeMovieClip();
if (((tiempo < ((nnivel + 1) * 35)) && (nnivel != aux)) && (aux != 0)) {
puntos = puntos + (((nnivel + 1) * 35) - tiempo);
}
tiempo = 0;
muerte = false;
ct = 1;
_parent.info_mc.parpadeante_mc._visible = false;
mostrarInfo();
destruirObjetos();
pj_mc.borrarSerpiente();
i = 0;
while (i < Number(nivel[nnivel].muros)) {
paredes_mc[i].removeMovieClip();
i++;
}
if (Number(aux) >= 48) {
_parent.muerte_mc._visible = true;
_parent.muerte_mc.gotoAndPlay(1);
} else {
nnivel = aux;
dir = 0;
_x = 0;
_y = 0;
pj_mc.mov.splice(0, pj_mc.mov.length);
pj_mc._x = 400;
pj_mc._y = 200;
cabeza_mc._x = pj_mc._x + 12;
cabeza_mc._y = pj_mc._y;
cabeza_mc.gotoAndStop(3);
pj_mc.colores = generarColores(nivel[nnivel].ele, nivel[nnivel].objetos);
pj_mc.ele = nivel[nnivel].ele;
paredes_mc.gotoAndStop(nivel[nnivel].paredes);
pj_mc.crearSerpiente();
intervalObjetos = setInterval(this, "generarObjetosIntervalo", 100);
mur = nivel[nnivel].locmuros.split(";");
i = 0;
while (i < Number(nivel[nnivel].muros)) {
paredes_mc.attachMovie("muro", i, i);
paredes_mc[i]._x = Number(mur[i].split(",")[0]);
paredes_mc[i]._y = Number(mur[i].split(",")[1]);
i++;
}
poratras_mc.attachMovie("puertamc", 0, 0);
poratras_mc[0]._x = nivel[nnivel].puerta.split(",")[0];
poratras_mc[0]._y = nivel[nnivel].puerta.split(",")[1];
poratras_mc.attachMovie("agujero", 1, 1);
poratras_mc[1]._x = nivel[nnivel].agujero.split(";")[0].split(",")[0];
poratras_mc[1]._y = nivel[nnivel].agujero.split(";")[0].split(",")[1];
poratras_mc.attachMovie("agujero", 2, 2);
poratras_mc[2]._x = nivel[nnivel].agujero.split(";")[1].split(",")[0];
poratras_mc[2]._y = nivel[nnivel].agujero.split(";")[1].split(",")[1];
}
}
function inicializarCo() {
co.push("AO001");
co.push("AO002");
co.push("JXJUE");
co.push("AHETY");
co.push("MARLT");
co.push("ISTLR");
co.push("ADWRT");
co.push("JGUTY");
co.push("LLJUY");
co.push("PONTY");
co.push("NONDA");
co.push("ACASA");
co.push("INUTA");
co.push("ADERU");
co.push("INSHU");
co.push("CASCA");
co.push("TELAR");
co.push("AUMAS");
co.push("ATRUC");
co.push("APUTA");
co.push("YTRUS");
co.push("WERTA");
co.push("ASULE");
co.push("MARRU");
co.push("LEPER");
co.push("MAZAG");
co.push("ANTIL");
co.push("HUELV");
co.push("AWQSD");
co.push("QPLLP");
co.push("DFGER");
co.push("POLLE");
co.push("RISCO");
co.push("AREST");
co.push("GRIFI");
co.push("CANUT");
co.push("MARIW");
co.push("YOGUR");
co.push("GAFAS");
co.push("GTYLE");
co.push("SDFDG");
co.push("WENOR");
co.push("JARLL");
co.push("AUSTR");
co.push("AOLNE");
co.push("DARKR");
co.push("BISHA");
co.push("ASTRA");
}
function generarColores(max, colores) {
aux = "";
anterior = "";
lista = colores.split(",");
i = 0;
while (i < max) {
color = lista[Math.ceil(Math.random() * lista.length) - 1];
if (Number(color) <= nbolas) {
if (anterior != color) {
if ((i + 1) >= max) {
aux = aux + color;
anterior = color;
} else {
aux = aux + (color + ",");
anterior = color;
}
i++;
}
}
}
return(aux);
}
function comprobarColisionObj() {
iniciox = pj_mc._x + pj_mc[0]._x;
inicioy = pj_mc._y + pj_mc[0]._y;
auxb = "";
z = nobjetos;
while (z >= 0) {
if ((objetos_mc[z]._x == iniciox) && (objetos_mc[z]._y == inicioy)) {
auxb = objetos_mc[z].objeto_mc._currentframe;
objetos_mc[z].removeMovieClip();
generarObjeto(z);
break;
}
z--;
}
return(auxb);
}
function ponerBomba() {
if (nbombas > 0) {
pr = this.getNextHighestDepth();
attachMovie("booomba", pr, pr);
this[pr]._x = pj_mc._x + pj_mc[0]._x;
this[pr]._y = pj_mc._y + pj_mc[0]._y;
nbombas--;
}
}
function partirMuro(bx, by) {
bx = bx + paredes_mc._x;
by = by + paredes_mc._y;
i = 0;
while (i < Number(nivel[nnivel].muros)) {
if ((((paredes_mc[i]._x > (bx - 30)) && (paredes_mc[i]._x < (bx + 40))) && (paredes_mc[i]._y < (by + 40))) && (paredes_mc[i]._y > (by - 30))) {
paredes_mc[i].removeMovieClip();
}
i++;
}
}
function destruirObjetos() {
i = 0;
while (i < nobjetos) {
objetos_mc[i].removeMovieClip();
i++;
}
nobjetos = 0;
}
function generarObjetos() {
while (nobjetos < nivel[nnivel].cant) {
generarObjeto(nobjetos);
nobjetos++;
}
}
function generarObjeto(prof) {
dis = pj_mc.colores.split(",");
objetos_mc.attachMovie("objeto", prof, prof);
objetos_mc[prof]._x = Math.floor((paredes_mc._width * Math.random()) / 20) * 20;
objetos_mc[prof]._y = Math.floor((paredes_mc._height * Math.random()) / 20) * 20;
prob = Math.ceil(Math.random() * 100);
if (prob < nivel[nnivel].pbomba) {
objetos_mc[prof].objeto_mc.gotoAndStop(9);
} else if (prob < (nivel[nnivel].pbomba + nivel[nnivel].pbolaa)) {
objetos_mc[prof].objeto_mc.gotoAndStop(Number(dis[Math.ceil(dis.length * Math.random()) - 1]) + 9);
} else if (prob < ((nivel[nnivel].pbomba + nivel[nnivel].pbolaa) + nivel[nnivel].pbolaoro)) {
objetos_mc[prof].objeto_mc.gotoAndStop(18);
} else if (prob < (((nivel[nnivel].pbomba + nivel[nnivel].pbolaa) + nivel[nnivel].pbolaoro) + nivel[nnivel].pbolaparp)) {
objetos_mc[prof].objeto_mc.gotoAndStop(19);
} else if (prob < ((((nivel[nnivel].pbomba + nivel[nnivel].pbolaa) + nivel[nnivel].pbolaoro) + nivel[nnivel].pbolaparp) + nivel[nnivel].pmundo)) {
if (!vidac) {
objetos_mc[prof].objeto_mc.gotoAndStop(20);
} else {
objetos_mc[prof].objeto_mc.gotoAndStop(9);
}
} else if (prob < (((((nivel[nnivel].pbomba + nivel[nnivel].pbolaa) + nivel[nnivel].pbolaoro) + nivel[nnivel].pbolaparp) + nivel[nnivel].pmundo) + nivel[nnivel].ppiedra)) {
objetos_mc[prof].objeto_mc.gotoAndStop(21);
} else if (prob < ((((((nivel[nnivel].pbomba + nivel[nnivel].pbolaa) + nivel[nnivel].pbolaoro) + nivel[nnivel].pbolaparp) + nivel[nnivel].pmundo) + nivel[nnivel].ppiedra) + nivel[nnivel].pcamaleon)) {
objetos_mc[prof].objeto_mc.gotoAndStop(22);
} else if (prob < (((((((nivel[nnivel].pbomba + nivel[nnivel].pbolaa) + nivel[nnivel].pbolaoro) + nivel[nnivel].pbolaparp) + nivel[nnivel].pmundo) + nivel[nnivel].ppiedra) + nivel[nnivel].pcamaleon) + nivel[nnivel].pcamaleon2)) {
objetos_mc[prof].objeto_mc.gotoAndStop(23);
} else {
objetos_mc[prof].objeto_mc.gotoAndStop(dis[Math.ceil(dis.length * Math.random()) - 1]);
}
if (checkHitObjeto(objetos_mc[prof], paredes_mc)) {
objetos_mc[prof].removeMovieClip();
generarObjeto(prof);
}
}
function inicializarNiveles() {
var _local1 = new Object();
_local1.ele = 5;
_local1.paredes = 1;
_local1.objetos = "1,2,3";
_local1.cant = 3;
_local1.pbomba = 5;
_local1.pbolaa = 0;
_local1.pbolaoro = 0;
_local1.pbolaparp = 0;
_local1.pmundo = 0;
_local1.ppiedra = 0;
_local1.pcamaleon = 0;
_local1.pcamaleon2 = 0;
_local1.muros = 0;
_local1.locmuros = "120,220;120,200;120,180;120,160;660,220;660,200;660,180;660,160";
_local1.puerta = "60,320";
_local1.agujero = "1780,1120;1720,1120";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 6;
_local1.paredes = 1;
_local1.objetos = "8,3,7";
_local1.cant = 3;
_local1.pbomba = 5;
_local1.pbolaa = 0;
_local1.pbolaoro = 0;
_local1.pbolaparp = 0;
_local1.pmundo = 0;
_local1.ppiedra = 0;
_local1.pcamaleon = 0;
_local1.pcamaleon2 = 0;
_local1.muros = 0;
_local1.locmuros = "120,220";
_local1.puerta = "60,320";
_local1.agujero = "1780,1120;1720,1120";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 7;
_local1.paredes = 2;
_local1.objetos = "3,4,5";
_local1.cant = 3;
_local1.pbomba = 5;
_local1.pbolaa = 0;
_local1.pbolaoro = 0;
_local1.pbolaparp = 0;
_local1.pmundo = 0;
_local1.ppiedra = 10;
_local1.pcamaleon = 0;
_local1.pcamaleon2 = 0;
_local1.muros = 0;
_local1.locmuros = "3000,3000;3000,3000";
_local1.puerta = "60,300";
_local1.agujero = "60,40;720,340";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 8;
_local1.paredes = 2;
_local1.objetos = "3,2,4";
_local1.cant = 4;
_local1.pbomba = 10;
_local1.pbolaa = 5;
_local1.pbolaoro = 0;
_local1.pbolaparp = 0;
_local1.pmundo = 0;
_local1.ppiedra = 10;
_local1.pcamaleon = 0;
_local1.pcamaleon2 = 0;
_local1.muros = 6;
_local1.locmuros = "660,140;660,160;660,180;660,200;660,220;660,240";
_local1.puerta = "60,300";
_local1.agujero = "60,40;720,340";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 9;
_local1.paredes = 3;
_local1.objetos = "1,5,3";
_local1.cant = 3;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 0;
_local1.pbolaparp = 0;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 0;
_local1.pcamaleon2 = 0;
_local1.muros = 0;
_local1.locmuros = "3000,3000;3000,3000";
_local1.puerta = "60,300";
_local1.agujero = "60,40;720,340";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 10;
_local1.paredes = 3;
_local1.objetos = "6,8,4";
_local1.cant = 5;
_local1.pbomba = 10;
_local1.pbola = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 0;
_local1.pcamaleon2 = 0;
_local1.muros = 6;
_local1.locmuros = "660,160;660,180;660,200;660,220;640,180;680,200";
_local1.puerta = "60,300";
_local1.agujero = "60,40;720,340";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 11;
_local1.paredes = 4;
_local1.objetos = "1,5,6";
_local1.cant = 6;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 0;
_local1.ppiedra = 10;
_local1.pcamaleon = 0;
_local1.pcamaleon2 = 0;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "460,340";
_local1.agujero = "3000,3000;3000,3000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 12;
_local1.paredes = 4;
_local1.objetos = "2,1,4";
_local1.cant = 6;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 8;
_local1.locmuros = "520,20;520,60;280,320;280,340;280,360;300,320;300,340;300,360";
_local1.puerta = "340,340";
_local1.agujero = "460,340;340,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 13;
_local1.paredes = 5;
_local1.objetos = "5,4,8";
_local1.cant = 7;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 0;
_local1.pbolaparp = 0;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 0;
_local1.pcamaleon2 = 0;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "740,340";
_local1.agujero = "3000,3000;3000,3000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 6;
_local1.paredes = 5;
_local1.objetos = "1,2,3,5";
_local1.cant = 5;
_local1.pbomba = 8;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 0;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 0;
_local1.pcamaleon2 = 0;
_local1.muros = 5;
_local1.locmuros = "460,180;460,200;640,320;640,340;640,360";
_local1.puerta = "740,340";
_local1.agujero = "40,180;740,180";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 7;
_local1.paredes = 6;
_local1.objetos = "1,4,3,5";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 14;
_local1.locmuros = "900,420;920,420;940,420;960,420;980,420;1000,420;1020,420;1040,420;1060,420;1080,420;1100,420;1120,420;1140,420;1160,420;1180,420";
_local1.puerta = "1140,540";
_local1.agujero = "3000,3000;3000,3000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 8;
_local1.paredes = 6;
_local1.objetos = "1,2,3,7";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 54;
_local1.locmuros = "680,240;680,260;680,280;680,300;680,320;680,340;680,360;680,380;680,400;680,420;680,440;680,460;680,480;680,500;680,520;680,540;680,560;680,580;700,240;700,260;700,280;700,300;700,320;700,340;700,360;700,380;700,400;700,420;700,440;700,460;700,480;700,500;700,520;700,540;700,560;700,580;720,240;720,260;720,280;720,300;720,320;720,340;720,360;720,380;720,400;720,420;720,440;720,460;720,480;720,500;720,520;720,540;720,560;720,580";
_local1.puerta = "1140,540";
_local1.agujero = "400,560;920,120";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 9;
_local1.paredes = 7;
_local1.objetos = "1,5,3,8";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 14;
_local1.locmuros = "900,420;920,420;940,420;960,420;980,420;1000,420;1020,420;1040,420;1060,420;1080,420;1100,420;1120,420;1140,420;1160,420;1180,420";
_local1.puerta = "1140,540";
_local1.agujero = "3000,3000;3000,3000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 10;
_local1.paredes = 7;
_local1.objetos = "4,2,6,8";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 54;
_local1.locmuros = "680,240;680,260;680,280;680,300;680,320;680,340;680,360;680,380;680,400;680,420;680,440;680,460;680,480;680,500;680,520;680,540;680,560;680,580;700,240;700,260;700,280;700,300;700,320;700,340;700,360;700,380;700,400;700,420;700,440;700,460;700,480;700,500;700,520;700,540;700,560;700,580;720,240;720,260;720,280;720,300;720,320;720,340;720,360;720,380;720,400;720,420;720,440;720,460;720,480;720,500;720,520;720,540;720,560;720,580";
_local1.puerta = "1140,540";
_local1.agujero = "400,560;920,120";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 11;
_local1.paredes = 8;
_local1.objetos = "1,2,3,4";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "1140,540";
_local1.agujero = "1120,40;60,540";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 12;
_local1.paredes = 8;
_local1.objetos = "3,4,5,6";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 9;
_local1.locmuros = "140,180;140,200;140,220;300,380;300,400;300,420;880,180;880,200;880,220";
_local1.puerta = "1140,540";
_local1.agujero = "1120,40;60,540";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 13;
_local1.paredes = 9;
_local1.objetos = "5,3,7,2";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "1120,300";
_local1.agujero = "1100,520;60,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 14;
_local1.paredes = 9;
_local1.objetos = "2,4,6,8";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 2;
_local1.locmuros = "800,280;800,320";
_local1.puerta = "1120,300";
_local1.agujero = "1100,520;60,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 7;
_local1.paredes = 10;
_local1.objetos = "1,2,3,4,5";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 4;
_local1.locmuros = "1020,460;1040,460;1060,460;1080,460";
_local1.puerta = "660,540";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 8;
_local1.paredes = 10;
_local1.objetos = "1,2,3,4,5";
_local1.cant = 10;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 10;
_local1.locmuros = "820,280;820,300;820,320;840,280;840,300;840,320;1020,460;1040,460;1060,460;1080,460";
_local1.puerta = "660,540";
_local1.agujero = "520,540;680,80";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 9;
_local1.paredes = 11;
_local1.objetos = "1,2,3,6,7";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "1340,780";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 10;
_local1.paredes = 11;
_local1.objetos = "1,4,3,8,7";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 12;
_local1.locmuros = "680,380;680,400;680,420;680,440;680,460;880,380;880,400;880,420;880,440;880,460;1200,220;1200,200";
_local1.puerta = "1540,340";
_local1.agujero = "1200,800;40,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 11;
_local1.paredes = 12;
_local1.objetos = "1,6,5,7,2";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "1520,780";
_local1.agujero = "840,660;740,660";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 12;
_local1.paredes = 12;
_local1.objetos = "3,1,2,6,7";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 7;
_local1.locmuros = "680,400;680,420;680,440;660,420;880,400;880,420;880,440";
_local1.puerta = "880,40";
_local1.agujero = "1540,40;40,780";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 13;
_local1.paredes = 13;
_local1.objetos = "1,5,4,8,7";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 9;
_local1.locmuros = "1120,120;1120,140;1120,160;780,280;800,280;820,280;1120,680;1120,700;1120,720";
_local1.puerta = "1540,40";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 14;
_local1.paredes = 13;
_local1.objetos = "8,7,6,5,4";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 12;
_local1.locmuros = "780,280;800,280;820,280;780,560;800,560;820,560;480,400;480,420;480,440;1120,400;1120,420;1120,440";
_local1.puerta = "1520,800";
_local1.agujero = "520,800;1080,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 15;
_local1.paredes = 14;
_local1.objetos = "4,2,3,1,6";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 6;
_local1.locmuros = "1160,720;1080,680;500,700;460,680;1100,140;1140,120";
_local1.puerta = "1540,780";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 8;
_local1.paredes = 14;
_local1.objetos = "1,2,3,4,5,6";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 6;
_local1.locmuros = "1160,720;1080,680;500,700;460,680;1100,140;1140,120";
_local1.puerta = "1540,40";
_local1.agujero = "1540,680;520,240";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 9;
_local1.paredes = 15;
_local1.objetos = "8,7,6,5,4,3";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "1540,800";
_local1.agujero = "1080,800;520,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 10;
_local1.paredes = 15;
_local1.objetos = "1,2,3,8,7,6";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 12;
_local1.locmuros = "1280,140;1300,140;1320,140;1340,140;1360,140;1380,140;1400,140;1500,140;1520,140;1540,140;1560,140;1220,20";
_local1.puerta = "1540,40";
_local1.agujero = "1080,800;520,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 12;
_local1.paredes = 16;
_local1.objetos = "2,6,4,3,8,7";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 4;
_local1.locmuros = "140,180;140,200;160,180;160,200";
_local1.puerta = "40,260";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 13;
_local1.paredes = 16;
_local1.objetos = "3,4,5,1,2,7";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 8;
_local1.locmuros = "140,180;140,200;160,180;160,200;180,180;180,200;200,180;200,200";
_local1.puerta = "40,260";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 14;
_local1.paredes = 17;
_local1.objetos = "5,6,7,8,4,3";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 2;
_local1.locmuros = "620,180;620,200";
_local1.puerta = "740,280";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 15;
_local1.paredes = 17;
_local1.objetos = "2,5,6,8,3,4";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 8;
_local1.locmuros = "120,160;120,180;120,200;120,220;140,180;140,200;160,180;160,200";
_local1.puerta = "40,260";
_local1.agujero = "40,120;740,280";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 15;
_local1.paredes = 18;
_local1.objetos = "1,2,3,6,5,4";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "740,280";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 15;
_local1.paredes = 18;
_local1.objetos = "6,5,4,3,2,1";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 6;
_local1.locmuros = "380,80;400,80;380,280;400,280;380,300;400,300";
_local1.puerta = "640,340";
_local1.agujero = "100,340;680,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 9;
_local1.paredes = 19;
_local1.objetos = "4,5,6,3,2,1,7";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "600,340";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 10;
_local1.paredes = 19;
_local1.objetos = "1,2,3,4,5,6,7";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 4;
_local1.locmuros = "200,180;200,200;220,200;220,180";
_local1.puerta = "160,340";
_local1.agujero = "380,40;740,360";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 10;
_local1.paredes = 20;
_local1.objetos = "1,2,3,8,7,6,5";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "40,320";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 11;
_local1.paredes = 20;
_local1.objetos = "8,7,6,5,4,3,2";
_local1.cant = 5;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 6;
_local1.locmuros = "560,160;560,180;560,200;560,220;580,220;600,220";
_local1.puerta = "720,60";
_local1.agujero = "5000,5000;5000,5000";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 13;
_local1.paredes = 21;
_local1.objetos = "1,3,5,7,2,4,6";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "1520,800";
_local1.agujero = "760,800;840,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 14;
_local1.paredes = 21;
_local1.objetos = "1,2,3,4,5,6,7";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 7;
_local1.locmuros = "760,280;780,280;20,600;40,600;1540,280;1560,280;820,680";
_local1.puerta = "1520,800";
_local1.agujero = "760,800;840,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 15;
_local1.paredes = 22;
_local1.objetos = "1,2,3,6,7,8,5";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "1520,800";
_local1.agujero = "760,800;840,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 10;
_local1.paredes = 22;
_local1.objetos = "1,2,3,4,5,6,7,8";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 22;
_local1.locmuros = "760,280;780,280;20,600;40,600;1540,280;1560,280;820,680;220,340;220,360;220,380;220,400;220,540;220,560;220,580;1100,340;1100,360;1100,380;1100,400;1100,600;1100,620;1100,640;1100,660";
_local1.puerta = "1520,800";
_local1.agujero = "760,800;840,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 11;
_local1.paredes = 23;
_local1.objetos = "8,7,6,5,4,3,2,1";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "1520,800";
_local1.agujero = "760,800;840,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 13;
_local1.paredes = 23;
_local1.objetos = "8,7,6,5,4,3,2,1";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 21;
_local1.locmuros = "760,280;780,280;20,600;40,600;1540,280;1560,280;820,680;220,540;220,560;220,580;680,460;700,460;720,460;740,460;760,460;780,460;1560,500;1100,600;1100,620;1100,640;1100,660";
_local1.puerta = "1520,800";
_local1.agujero = "760,800;840,40";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 14;
_local1.paredes = 24;
_local1.objetos = "8,7,6,5,4,3,2,1";
_local1.cant = 15;
_local1.pbomba = 5;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 0;
_local1.locmuros = "";
_local1.puerta = "1140,100";
_local1.agujero = "460,280;840,60";
nivel.push(_local1);
_local1 = new Object();
_local1.ele = 20;
_local1.paredes = 24;
_local1.objetos = "8,7,6,5,4,3,2,1";
_local1.cant = 15;
_local1.pbomba = 10;
_local1.pbolaa = 5;
_local1.pbolaoro = 5;
_local1.pbolaparp = 5;
_local1.pmundo = 5;
_local1.ppiedra = 10;
_local1.pcamaleon = 5;
_local1.pcamaleon2 = 5;
_local1.muros = 8;
_local1.locmuros = "300,800;300,720;300,580;1140,720;1140,600;1140,460;1140,320;1140,180";
_local1.puerta = "1140,100";
_local1.agujero = "460,280;840,60";
nivel.push(_local1);
}
function direccion() {
if (_parent.menu_mc._visible == false) {
if (Key.isDown(37)) {
if (pj_mc[1] == undefined) {
dir = 1;
} else if (pj_mc[1]._x != (pj_mc[0]._x - pj_mc.ancho)) {
dir = 1;
}
} else if (Key.isDown(39)) {
if (pj_mc[1] == undefined) {
dir = 2;
} else if (pj_mc[1]._x != (pj_mc[0]._x + pj_mc.ancho)) {
dir = 2;
}
} else if (Key.isDown(38)) {
if (pj_mc[1] == undefined) {
dir = 3;
} else if (pj_mc[1]._y != (pj_mc[0]._y - pj_mc.ancho)) {
dir = 3;
}
} else if (Key.isDown(40)) {
if (pj_mc[1] == undefined) {
dir = 4;
} else if (pj_mc[1]._y != (pj_mc[0]._y + pj_mc.ancho)) {
dir = 4;
}
}
}
}
function mover() {
cant = pj_mc.vel;
switch (dir) {
case 1 :
pj_mc.moverIzquierda();
return;
case 2 :
pj_mc.moverDerecha();
return;
case 3 :
pj_mc.moverArriba();
return;
case 4 :
pj_mc.moverAbajo();
}
}
function comprobarColision() {
if (pj_mc.choque()) {
dir = 0;
cabeza_mc.play();
pausa = true;
muerte = true;
_parent.playsnd2.start();
_parent.muerte_mc._visible = true;
_parent.muerte_mc.gotoAndPlay(1);
}
if (checkHitSerp(pj_mc, paredes_mc)) {
dir = 0;
cabeza_mc.play();
pausa = true;
muerte = true;
_parent.playsnd2.start();
_parent.muerte_mc._visible = true;
_parent.muerte_mc.gotoAndPlay(1);
}
}
function checkHitSerp(a, b) {
aux = false;
iniciox = ((a._x + a[0]._x) + 1) + _x;
inicioy = ((a._y + a[0]._y) + 1) + _y;
finx = (((a._x + a[0]._x) + a.ancho) - 1) + _x;
finy = (((a._y + a[0]._y) + a.ancho) - 1) + _y;
if (paredes_mc.hitTest(iniciox, inicioy, true)) {
aux = true;
}
if (paredes_mc.hitTest(finx, inicioy, true)) {
aux = true;
}
if (paredes_mc.hitTest(iniciox, finy, true)) {
aux = true;
}
if (paredes_mc.hitTest(finx, finy, true)) {
aux = true;
}
return(aux);
}
function checkHit(a, b) {
aux = false;
if (b.hitTest(a._x, a._y, true)) {
aux = true;
}
if (b.hitTest(a._x + a._width, a._y, true)) {
aux = true;
}
if (b.hitTest(a._x, a._y + a._height, true)) {
aux = true;
}
if (b.hitTest(a._x + a._width, a._y + a._height, true)) {
aux = true;
}
return(aux);
}
function checkHitObjeto(a, b) {
aux = false;
iniciox = (a._x + 5) + _x;
inicioy = (a._y + 5) + _y;
finx = (a._x - 5) + _x;
finy = (a._y - 5) + _y;
if (paredes_mc.hitTest(iniciox, inicioy, true)) {
aux = true;
}
if (paredes_mc.hitTest(finx, inicioy, true)) {
aux = true;
}
if (paredes_mc.hitTest(iniciox, finy, true)) {
aux = true;
}
if (paredes_mc.hitTest(finx, finy, true)) {
aux = true;
}
return(aux);
}
var dir = 0;
var pausa = false;
var muerte = false;
var nivel = new Array();
var nobjetos = 0;
var nnivel = 0;
var nbolas = 8;
var vidas = 3;
var nbombas = 0;
var puntos = 0;
var tiempo = 0;
var ct = 0;
var vidac = false;
var intervalObjetos;
var co = new Array();
mensaje_txt._visible = false;
inicializarNiveles();
inicializarCo();
onEnterFrame = function () {
if (!pausa) {
mostrarInfo();
if (dir != 0) {
ct++;
}
if ((ct % 25) == 0) {
tiempo++;
ct = 0;
if ((tiempo % 30) == 0) {
pbola = false;
while (!pbola) {
bolaaaa = Math.ceil(Math.random() * 8);
if ((bolaaaa != pj_mc[0]._currentframe) && (bolaaaa != pj_mc[pj.ele - 1]._currentframe)) {
pbola = true;
}
}
if (pj_mc.objeto == "") {
pj_mc.objeto = bolaaaa;
pj_mc.colision = true;
pj_mc.gestionarColision();
}
}
}
direccion();
mover();
}
};
var myListener = new Object();
myListener.onKeyDown = function () {
if (Key.getCode() == 17) {
if ((nbombas > 0) && (_parent.menu_mc._visible == false)) {
ponerBomba();
}
}
if (Key.getCode() == 13) {
if (muerte) {
if (vidas > 0) {
ponerNivel(nnivel);
vidas--;
pausa = false;
muerte = false;
}
}
}
if (((Key.getCode() == 80) && (!muerte)) && (_parent.menu_mc._visible == false)) {
if (!pausa) {
pausa = true;
if (_parent.idioma == "es") {
mensaje_txt.text = "PAUSA\nPRESIONA P PARA CONTINUAR";
} else {
mensaje_txt.text = "PAUSE\nPRESS P TO CONTINUE";
}
mensaje_txt._x = (-_x) + 213;
mensaje_txt._y = (-_y) + 168;
mensaje_txt._visible = true;
} else {
pausa = false;
mensaje_txt._visible = false;
}
}
};
Key.addListener(myListener);
Symbol 146 MovieClip Frame 1
stop();
onRollOver = function () {
if (!_parent.ventana) {
_parent._parent.playsnd3.start();
gotoAndPlay (2);
}
};
onDragOver = function () {
if (!_parent.ventana) {
_parent._parent.playsnd3.start();
gotoAndPlay (2);
}
};
onRollOut = function () {
if (!_parent.ventana) {
gotoAndStop (1);
}
};
onDragOut = function () {
if (!_parent.ventana) {
gotoAndStop (1);
}
};
Symbol 146 MovieClip Frame 10
stop();
Symbol 151 MovieClip Frame 1
stop();
onRollOver = function () {
if (!_parent.ventana) {
_parent._parent.playsnd3.start();
gotoAndPlay (2);
}
};
onDragOver = function () {
if (!_parent.ventana) {
_parent._parent.playsnd3.start();
gotoAndPlay (2);
}
};
onRollOut = function () {
if (!_parent.ventana) {
gotoAndStop (1);
}
};
onDragOut = function () {
if (!_parent.ventana) {
gotoAndStop (1);
}
};
Symbol 151 MovieClip Frame 10
stop();
Symbol 154 MovieClip Frame 25
stop();
record_mc._visible = false;
enviar_mc._visible = false;
if (_parent.idioma == "es") {
salir_mc.texto = "Salir";
if ((_parent.juego_mc.vidas > 0) && (_parent.juego_mc.muerte)) {
mensaje_txt.text = ("Has chocado, te quedan " + Number(_parent.juego_mc.vidas - 1)) + " vidas\nPulsa enter para continuar";
} else {
if (_parent.juego_mc.muerte) {
mensaje_txt.text = "Fin del juego, tu puntuaci\u00F3n es " + _parent.juego_mc.puntos;
} else {
mensaje_txt.text = "Terminaste el juego. \u00A1Felicidades! Tu puntaci\u00F3n es " + _parent.juego_mc.puntos;
}
enviar_mc.texto = "Enviar";
record_mc._visible = true;
enviar_mc._visible = true;
}
} else {
salir_mc.texto = "Exit";
if ((_parent.juego_mc.vidas > 0) && (_parent.juego_mc.muerte)) {
mensaje_txt.text = ("You have crashed, you have " + Number(_parent.juego_mc.vidas - 1)) + " remaining lifes\nHit enter to continue";
} else {
if (_parent.juego_mc.muerte) {
mensaje_txt.text = "Game over, your score is " + _parent.juego_mc.puntos;
} else {
mensaje_txt.text = "You finished the game, congratulations! Your score is " + _parent.juego_mc.puntos;
}
enviar_mc.texto = "Send";
record_mc._visible = true;
enviar_mc._visible = true;
}
}
enviar_mc.onRelease = function () {
if ((nick_txt.text != "Write your nick") && (nick_txt.text != "Escribe tu nick")) {
_parent.enviar(escape(nick_txt.text.toUpperCase()), _parent.juego_mc.puntos, "Snake Bubbles");
_parent.juego_mc.pausa = true;
_parent.menu_mc.mascara_mc.gotoAndPlay(31);
_parent.menu_mc._visible = true;
}
};
salir_mc.onRelease = function () {
_parent.juego_mc.pausa = true;
_parent.menu_mc.mascara_mc.gotoAndPlay(31);
_parent.menu_mc._visible = true;
};
Symbol 154 MovieClip Frame 50
stop();
_visible = false;
Symbol 159 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 30
stop();
_parent._visible = false;
Symbol 159 MovieClip Frame 50
stop();
Symbol 160 MovieClip Frame 1
useHandCursor = false;
onRelease = function () {
};
Symbol 164 MovieClip Frame 1
gotoAndPlay(Math.ceil((Math.random() * 7) * 10));
Symbol 170 MovieClip Frame 1
stop();
onRollOver = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (2);
}
};
onRollOut = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (1);
}
};
onRelease = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (2);
selec = true;
_parent._parent.idioma = "es";
_parent.ingles_mc.gotoAndStop(1);
_parent.ingles_mc.selec = false;
_parent.inicializar();
}
};
onDragOver = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (2);
}
};
onDragOut = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (1);
}
};
Symbol 170 MovieClip Frame 2
stop();
Symbol 176 MovieClip Frame 1
stop();
onRollOver = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (2);
}
};
onRollOut = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (1);
}
};
onRelease = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (2);
selec = true;
_parent._parent.idioma = "en";
_parent.espa_mc.gotoAndStop(1);
_parent.espa_mc.selec = false;
_parent.inicializar();
}
};
onDragOver = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (2);
}
};
onDragOut = function () {
if ((!selec) && (!_parent.ventana)) {
gotoAndStop (1);
}
};
Symbol 176 MovieClip Frame 2
stop();
Symbol 182 MovieClip Frame 1
stop();
onRollOver = function () {
_parent._parent.playsnd3.start();
gotoAndPlay (2);
};
onDragOver = function () {
_parent._parent.playsnd3.start();
gotoAndPlay (2);
};
onRollOut = function () {
gotoAndStop (1);
};
onDragOut = function () {
gotoAndStop (1);
};
Symbol 182 MovieClip Frame 10
stop();
Symbol 183 MovieClip Frame 1
function inicializar() {
if (_parent._parent.idioma == "es") {
mensaje = "Introduce el c\u00F3digo del nivel";
} else {
mensaje = "Write level code";
}
if (_parent._parent.idioma == "es") {
volver_mc.texto = "Volver";
comenzar_mc.texto = "Comenzar";
} else {
volver_mc.texto = "Back";
comenzar_mc.texto = "Start";
}
Selection.setFocus("codigo_txt");
}
volver_mc.onRelease = function () {
_visible = false;
_parent.ventana = false;
};
comenzar_mc.onRelease = function () {
existe = false;
i = 0;
while (i < _parent._parent.juego_mc.co.length) {
if (_parent._parent.juego_mc.co[i] == codigo_txt.text) {
existe = true;
break;
}
i++;
}
if (existe) {
_parent.nuevoJuego(i);
}
};
Symbol 196 MovieClip Frame 1
function inicializar() {
if (_parent._parent.idioma == "es") {
mensaje = "Instrucciones";
volver_mc.texto = "Volver";
teclas_txt.text = "Usa los cursores para mover la serpiente";
control_txt.text = "Usa control para colocar bombas";
objetivo_txt.text = "Debes ir cogiendo las bolas que aparecen en pantalla y salir por la puerta quedando s\u00F3lo la cabeza de la serpiente para superar los 50 niveles. Si la serpiente tiene 2 bolas del mismo color seguidas se quitan. Cada 30 segundos se a\u00F1ade una bola.";
des1_txt.text = "Quita la primera o \u00FAltima bola si es del mismo color, sino se a\u00F1ade.\n\nQuita todas las bolas del color.\n\n+1 bomba (destruye muros verdes).\n\n-3 primeras bolas";
des2_txt.text = "Quita las bolas del color de la siguiente que cojas.\n\n+1 vida.\n\nChoque (-1 vida).\n\nCambia el color de la primera bola.\n\nCambia el color de todas las bolas.";
} else {
mensaje = "Instructions";
volver_mc.texto = "Back";
teclas_txt.text = "Use the arrows to move the snake";
control_txt.text = "Use control to place the bombs";
objetivo_txt.text = "You have to take the bubbles which appear in the screen and exit through the door with just the snake's head to pass the 50 levels. If the snake has more than 2 bubbles together of same colour they will disappear. Each 30 seconds a new ball is added.";
des1_txt.text = "It quits the firt or last bubble if it is of same colour, else it will be added.\n\nIt quits all bubbles of the same colour.\n+1 bomb (It destroys green walls).\n\n-3 first bubbles";
des2_txt.text = "It quits all bubbles of same colour to the next you take.\n+1 life.\n\nCrash (-1 life).\n\nIt changes the colour of first bubble.\n\nIt changes the colour of all bubbles. ";
}
Selection.setFocus("codigo_txt");
}
a.gotoAndStop(1);
b.gotoAndStop(10);
c.gotoAndStop(9);
d.gotoAndStop(18);
e.gotoAndStop(19);
f.gotoAndStop(20);
g.gotoAndStop(21);
h.gotoAndStop(22);
i.gotoAndStop(23);
volver_mc.onRelease = function () {
_visible = false;
_parent.ventana = false;
};
Symbol 204 MovieClip Frame 1
stop();
onRollOver = function () {
_parent._parent.playsnd3.start();
gotoAndPlay (2);
};
onDragOver = function () {
_parent._parent.playsnd3.start();
gotoAndPlay (2);
};
onRollOut = function () {
gotoAndStop (1);
};
onDragOut = function () {
gotoAndStop (1);
};
Symbol 204 MovieClip Frame 10
stop();
Symbol 205 MovieClip Frame 1
function inicializar() {
mensaje = "Ranking";
if (_parent._parent.idioma == "es") {
rec_mc.texto = "Ver todos";
volver_mc.texto = "Volver";
} else {
rec_mc.texto = "View all";
volver_mc.texto = "Back";
}
cargar();
}
function cargar() {
}
function mostrar(aux) {
pos_txt.text = "";
nicks_txt.text = "";
records_txt.text = "";
lista = aux.split(newline);
i = 0;
while (i < lista.length) {
ele = lista[i].split(" ~ ");
pos_txt.text = pos_txt.text + ((i + 1) + newline);
nicks_txt.text = nicks_txt.text + (unescape(ele[0]) + newline);
records_txt.text = records_txt.text + (ele[1] + newline);
i++;
}
}
rec_mc.onRelease = function () {
};
volver_mc.onRelease = function () {
_visible = false;
_parent.ventana = false;
};
Symbol 206 MovieClip Frame 1
loadMovie (_parent.ruta + "publi.swf", vacio_mc);
function inicializar() {
if (_parent.idioma == "es") {
texto1_mc.texto = "Nuevo juego";
texto2_mc.texto = "Seleccionar pantalla";
texto3_mc.texto = "Ranking";
texto4_mc.texto = "Instrucciones";
} else {
texto1_mc.texto = "New game";
texto2_mc.texto = "Level selection";
texto3_mc.texto = "Ranking";
texto4_mc.texto = "Instructions";
}
}
function nuevoJuego(nivel) {
mascara_mc.gotoAndPlay(2);
_parent.juego_mc.dir = 0;
_parent.juego_mc.pausa = false;
_parent.juego_mc.muerte = false;
_parent.juego_mc.nbolas = 8;
_parent.juego_mc.vidas = 3;
_parent.juego_mc.nbombas = 0;
_parent.juego_mc.puntos = 0;
_parent.juego_mc.tiempo = 0;
_parent.juego_mc.ct = 0;
_parent.juego_mc.ponerNivel(nivel);
}
codigo_mc._visible = false;
instrucciones_mc._visible = false;
ranking_mc._visible = false;
ventana = false;
espa_mc.gotoAndStop(1);
ingles_mc.gotoAndStop(2);
espa_mc.selec = false;
ingles_mc.selec = true;
desde = _root._url.split("http://")[1].split("/")[0];
if ((desde == "www.allonline.es") || (desde == "www.allonlineweb.com")) {
texto3_mc._visible = false;
texto4_mc._y = texto3_mc._y;
}
inicializar();
texto1_mc.onRelease = function () {
if (!ventana) {
_parent.playsnd.start();
nuevoJuego(0);
}
};
texto2_mc.onRelease = function () {
if (!ventana) {
codigo_mc._visible = true;
codigo_mc.inicializar();
ventana = true;
_parent.playsnd.start();
}
};
texto3_mc.onRelease = function () {
if (!ventana) {
getURL ("http://www.allonline.es/index.php?p=true&n=SNAKE%20BUBBLES&i=105", "_blank");
_parent.playsnd.start();
}
};
texto4_mc.onRelease = function () {
if (!ventana) {
_parent.playsnd.start();
ventana = true;
instrucciones_mc._visible = true;
instrucciones_mc.inicializar();
}
};