Frame 1
function visitar_pixelgo() {
getURL ("http://www.pixelgo.com", "_blank");
}
var opciones = new ContextMenu();
opciones.hideBuiltInItems();
opcion1 = new ContextMenuItem("Mico Maco by PixelGo!", visitar_pixelgo);
opciones.customItems.push(opcion1);
_root.menu = opciones;
Frame 2
function slow() {
_root.ai.stopFire();
_root.speed = 1;
_root.createEmptyMovieClip("wait", 1000);
_root.wait.count = 0;
_root.wait.onEnterFrame = function () {
if (!_root.onPause) {
this.count++;
if (this.count >= 80) {
_root.ai.fire();
_root.speed = _root.initSpeed;
this.removeMovieClip();
}
}
};
}
function fast() {
_root.speed = 5;
_root.createEmptyMovieClip("wait", 1000);
_root.wait.count = 0;
_root.wait.onEnterFrame = function () {
if (!_root.onPause) {
this.count++;
if (this.count >= 50) {
_root.ai.fire();
_root.speed = _root.initSpeed;
this.removeMovieClip();
}
}
};
}
function blink() {
_root.game.attachMovie("white", "white", 200);
_root.game.white.onEnterFrame = function () {
if (!_root.onPause) {
this._alpha = this._alpha - 2;
if (this._alpha <= 50) {
this.removeMovieClip();
}
}
};
}
function irIntro() {
stopAllSounds();
_root.sB.playT("miniloop");
_root.gotoAndPlay("intro");
}
function setupMain() {
portada.jugar_btn.onRelease = function () {
_root.gotoAndPlay("joc");
_root.sB.stopS("miniloop");
_root.sB.playS("press");
_root.sB.playT("micu_theme");
_root.speed = initSpeed;
_root.juego.resetScore();
_root.ai.startGame();
};
portada.instruccions_btn.onRelease = function () {
_root.sB.playS("press");
_root.gotoAndPlay("instruccions");
};
portada.ranking_btn.onRelease = function () {
stopAllSounds();
_root.sB.playS("press");
_root.sB.playT("fi");
_root.gotoAndPlay("ranking");
_root.newRanking.showRanking(_root);
_root.back.onRollOver = function () {
_root.sB.playS("roll_over");
};
_root.back.onRelease = function () {
stopAllSounds();
_root.sB.playS("press");
_root.sB.playT("miniloop");
_root.gotoAndPlay("intro");
};
};
portada.jugar_btn.onRollOver = (portada.instruccions_btn.onRollOver = (portada.ranking_btn.onRollOver = function () {
_root.sB.playS("roll_over");
}));
stop();
}
function pauseGame() {
if ((!_root.onPause) && (_root.jugando)) {
stopAllSounds();
_root.onPause = true;
this.ai.pausar();
_root.speed = 0;
_root.game.attachMovie("pausa", "pausa", 5000);
_root.game.pausa.onRelease = function () {
_root.sB.playS("press");
_root.unpauseGame();
this.removeMovieClip();
};
}
}
function unpauseGame() {
_root.sB.playT("micu_theme");
_root.onPause = false;
this.ai.despausar();
_root.speed = _root.initSpeed;
}
stop();
loader.onEnterFrame = function () {
var _local5 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local4 = Math.floor(100 * (_local5 / _local3));
this.load_bar.gotoAndStop(_local4);
};
loader.checkLoad = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local5 = Math.floor(100 * (_local4 / _local3));
this.load_bar.gotoAndStop(_local5);
if (_local4 >= _local3) {
this.count = 0;
this.onEnterFrame = function () {
if ((this.count++) > 15) {
this.gotoAndStop("loaded");
this.continue_btn.onRelease = function () {
_root.gotoAndPlay("intro");
_root.sB.loadSounds();
_root.sB.playT("miniloop");
};
}
};
}
};
loader.startCheckLoad = function () {
this.onEnterFrame = this.checkLoad;
};
loader.pixelgo_logo.onRelease = function () {
getURL ("http://www.pixelgo.com/", "_blank");
};
loader.pixelgo_btn.onRelease = function () {
getURL ("http://www.pixelgo.com/", "_blank");
};
loader.store_btn.onRelease = function () {
getURL ("http://www.cafepress.com/pixelgo/", "_blank");
};
loader.jay_btn.onRelease = function () {
getURL ("http://jayisgames.com/", "_blank");
};
var score = 0;
var initSpeed = 3;
var speed = initSpeed;
var newRanking = new Ranking();
var juego = new Stats();
var ai = new AI();
var onPause = false;
var sB = new SoundBank(9999);
var juegando = false;
Frame 9
_root.setupMain();
Frame 16
stop();
Frame 22
enrera.onRelease = irIntro;
stop();
Frame 31
stop();
Symbol 3 MovieClip [loader] Frame 1
#initclip 1
Object.registerClass("loader", Preloader);
#endinitclip
Symbol 26 MovieClip Frame 1
stop();
this.count = 0;
this.onEnterFrame = function () {
if ((this.count++) >= 30) {
var _local2 = this._currentframe + 1;
if (_local2 > this._totalframes) {
_local2 = 1;
}
this.gotoAndStop(_local2);
this.count = 0;
}
};
Symbol 44 MovieClip Frame 70
stop();
startCheckLoad();
Symbol 306 MovieClip [__Packages.Preloader] Frame 0
class Preloader extends MovieClip
{
var stop, total, onEnterFrame;
function Preloader () {
super();
stop();
total = _root.getBytesTotal();
onEnterFrame = function () {
this.percent = Math.round((100 * _root.getBytesLoaded()) / this.total);
this.gotoAndStop(this.percent);
if (_root.getBytesLoaded() == this.total) {
_root.gotoAndPlay("intro");
_root.sB.loadSounds();
_root.sB.playT("miniloop");
}
};
}
}
Symbol 307 MovieClip [__Packages.Ranking] Frame 0
class Ranking extends Object
{
var rank;
function Ranking () {
super();
rank = SharedObject.getLocal("MicoMaco");
if (rank.data.pos == undefined) {
rank.data.pos = new Array();
rank.data.pos.push({nombre:"King Mico", puntos:100000});
rank.data.pos.push({nombre:"Jazzmic", puntos:90000});
rank.data.pos.push({nombre:"Midori", puntos:80000});
rank.data.pos.push({nombre:"Bass", puntos:70000});
rank.data.pos.push({nombre:"Xuc", puntos:60000});
rank.data.pos.push({nombre:"Lore", puntos:50000});
rank.data.pos.push({nombre:"Jordi", puntos:40000});
rank.data.pos.push({nombre:"K3ko", puntos:30000});
rank.data.pos.push({nombre:"Neng", puntos:20000});
rank.data.pos.push({nombre:"Kass", puntos:10000});
}
}
function showRanking(pelicula) {
var _local2 = 0;
while (_local2 < rank.data.pos.length) {
pelicula["pos" + _local2].nombre.text = rank.data.pos[_local2].nombre;
pelicula["pos" + _local2].puntos.text = rank.data.pos[_local2].puntos;
_local2++;
}
}
function checkRanking(punts) {
if (punts >= rank.data.pos[rank.data.pos.length - 1].puntos) {
return(true);
}
return(false);
}
function newScore(nombre, puntos) {
rank.data.pos.push({nombre:String(nombre), puntos:Number(puntos)});
rank.data.pos.sortOn("puntos", 18);
rank.data.pos.splice(rank.data.pos.length - 1);
rank.data.flush();
}
}
Symbol 308 MovieClip [__Packages.Stats] Frame 0
class Stats extends Object
{
var score, vidas, gO;
function Stats () {
super();
score = 0;
vidas = 3;
}
function scoreUp(puntillos) {
if (_root.jugando) {
var _local3 = score + puntillos;
if (!isNaN(_local3)) {
score = _local3;
showScore();
}
}
}
function resetScore() {
score = 0;
vidas = 3;
showScore();
}
function perderVida() {
vidas--;
if (vidas <= 0) {
_root.sB.playS("sandia_floor");
showScore();
gameOver();
return(false);
}
showScore();
return(true);
}
function showScore() {
_root.game.marcador.gotoAndStop("vidas" + _root.juego.vidas);
_root.game.marcador.puntos.text = score;
}
function gameOver() {
_quality = "HIGH";
_root.jugando = false;
_root.ai.clearAll();
_root.sB.stopS("micu_theme");
_root.sB.playT("fi");
gO = _root.game.attachMovie("gameOver", "gameOver", 6000);
if (_root.newRanking.checkRanking(score)) {
gO.gotoAndStop(1);
gO.score.text = _root.juego.score;
gO.nombre.onSetFocus = function () {
this.text = "";
};
gO.back.onRelease = function () {
_root.sB.playS("press");
_root.newRanking.newScore(this._parent.nombre.text, Number(this._parent.score.text));
_root.juego.resetScore();
_root.gotoAndPlay("ranking");
_root.newRanking.showRanking(_root);
_root.back.onRelease = function () {
_root.irIntro();
_root.sB.playS("press");
};
};
} else {
gO.gotoAndStop(2);
gO.score.text = _root.juego.score;
gO.back.onRelease = function () {
_root.sB.playS("press");
_root.sB.stopS("fi");
_root.sB.playT("miniloop");
_root.juego.resetScore();
_root.gotoAndPlay("intro");
};
}
}
}
Symbol 309 MovieClip [__Packages.SoundBank] Frame 0
class SoundBank extends Object
{
var depth, sBank;
function SoundBank (layer) {
super();
depth = 0;
sBank = _root.createEmptyMovieClip("sBank", layer);
}
function loadSounds() {
addSound("micu_theme", 100);
addSound("miniloop", 100);
addSound("slide", 100);
addSound("monkey_burn", 100);
addSound("fi", 100);
addSound("roll_over", 100);
addSound("press", 100);
addSound("banana_floor", 100);
addSound("chilli_floor", 30);
addSound("clock_floor", 100);
addSound("sandia_floor", 100);
addSound("pil_floor", 120);
addSound("star_floor", 10);
addSound("banana_fire", 100);
addSound("chilli_fire", 50);
addSound("clock_fire", 50);
addSound("sandia_fire", 100);
addSound("pil_fire", 50);
addSound("star_fire", 70);
}
function addSound(nom, vol) {
if (!this[nom]) {
this[nom] = _root.sBank.createEmptyMovieClip("sound" + depth, depth++);
this[nom].s = new Sound(this[nom]);
this[nom].s.attachSound(nom);
this[nom].s.setVolume(vol);
}
}
function playS(nom) {
this[nom].s.start(0, 1);
}
function stopS(nom) {
this[nom].s.stop();
}
function playT(nom) {
this[nom].s.start(0, 9999);
}
}
Symbol 310 MovieClip [__Packages.AI] Frame 0
class AI extends Object
{
var guardT1, gCount, shotT1, nextG, gInt, sInt, disparo, pauseT;
function AI () {
super();
guardT1 = getTimer();
}
function startGame() {
gCount = 0;
shotT1 = 0;
oneMan();
_root.jugando = true;
_root.game.men.onEnterFrame = bounceChk;
}
function oneMan() {
clearInterval(nextG);
if (gCount > 3) {
} else {
switch (gCount) {
case 0 :
gInt = 800;
nextG = setInterval(this, "oneMan", gInt);
sInt = 1200;
disparo = setInterval(this, "oneShot", sInt);
break;
case 1 :
gInt = 40000;
nextG = setInterval(this, "oneMan", gInt);
sInt = 1000;
clearInterval(disparo);
disparo = setInterval(this, "oneShot", sInt);
break;
case 2 :
gInt = 80000 /* 0x013880 */;
nextG = setInterval(this, "oneMan", gInt);
sInt = 800;
clearInterval(disparo);
disparo = setInterval(this, "oneShot", sInt);
}
guardT1 = getTimer();
getMan();
}
gCount++;
}
function getMan() {
var _local2;
_local2 = _root.game.men.pegar("guardia", 0, 80);
_local2.origen(((Math.random() < 0.5) ? "left" : "right"));
}
function oneShot() {
clearInterval(disparo);
disparo = setInterval(this, "oneShot", sInt);
shotT1 = getTimer();
var _local4 = new Array();
var _local3 = 1;
while (_local3 < gCount) {
if (!_root.game.men["guardia" + _local3].activo) {
_local4.push(_root.game.men["guardia" + _local3]);
}
_local3++;
}
if (_local4.length > 0) {
_local4[Math.round(Math.random() * _local4.length)].fire();
}
}
function stopFire() {
clearInterval(disparo);
}
function fire() {
if (shotT1 > 0) {
clearInterval(disparo);
oneShot();
}
}
function clearAll() {
clearInterval(nextG);
clearInterval(disparo);
}
function pausar() {
pauseT = getTimer();
clearAll();
}
function despausar() {
if (gCount < 4) {
nextG = setInterval(this, "oneMan", 10000);
}
disparo = setInterval(this, "oneShot", sInt);
}
function bounceChk() {
var _local7 = _root.ai.gCount;
if (_local7 > 2) {
var _local5 = 1;
while (_local5 < _local7) {
var _local4 = _local5 + 1;
while (_local4 < _local7) {
var _local3 = _root.game.men["guardia" + _local5];
var _local2 = _root.game.men["guardia" + _local4];
var _local6 = Math.abs(_local3._x - _local2._x);
if (_local6 <= 50) {
if (_local3._x < _local2._x) {
_local3.enfocar("izquierda");
_local2.enfocar("derecha");
} else {
_local3.enfocar("derecha");
_local2.enfocar("izquierda");
}
}
_local4++;
}
_local5++;
}
}
}
}
Symbol 311 MovieClip [__Packages.FallingItem] Frame 0
class FallingItem extends MovieClip
{
var suelo, score, tipo, burnt, stop, onEnterFrame, _y, removeMovieClip, gotoAndPlay, premio, _x;
function FallingItem () {
super();
suelo = 504;
score = 10;
tipo = "banana";
burnt = false;
stop();
onEnterFrame = fall;
}
function fall() {
if (!_root.onPause) {
_y = _y + _root.speed;
if (_y >= suelo) {
_y = suelo;
hitGround();
}
}
}
function hitGround() {
loseScore();
effect();
}
function effect() {
removeMovieClip();
}
function burn() {
burnt = true;
gotoAndPlay("burn");
hitGround = (burn = function () {
});
}
function loseScore() {
premio = _root.game.scoreUp.pegar("negativeScores", _x, _y - 50);
premio.gotoAndStop("score" + (score / 2));
_root.juego.scoreUp((-score) / 2);
}
}
Symbol 312 MovieClip [__Packages.Chilli] Frame 0
class Chilli extends FallingItem
{
var score, tipo, llamas, _x, _y, removeMovieClip;
function Chilli () {
super();
score = 300;
tipo = "chilli";
}
function effect() {
_root.sB.playS("chilli_floor");
llamas = _root.game.scoreUp.pegar("llamas", _x, _y);
llamas.count = 0;
llamas.onEnterFrame = function () {
if (!_root.onPause) {
this.count++;
if (this.count >= 40) {
this._alpha = this._alpha - 10;
if (this._alpha <= 20) {
this.removeMovieClip();
}
}
for (var _local3 in _root.game.fallingItems) {
if (this.hitTest(_root.game.fallingItems[_local3])) {
_root.game.fallingItems[_local3].burn();
}
}
if (_root.game.mono.hitTest(this)) {
_root.game.mono.quemar();
this.removeMovieClip();
}
}
};
removeMovieClip();
}
}
Symbol 313 MovieClip [__Packages.Clock] Frame 0
class Clock extends FallingItem
{
var score, tipo, _x, _y, removeMovieClip;
function Clock () {
super();
score = 300;
tipo = "clock";
}
function effect() {
_root.sB.playS("clock_floor");
_root.game.scoreUp.pegar("clockghost", _x, _y);
_root.fast();
removeMovieClip();
}
}
Symbol 314 MovieClip [__Packages.Sandia] Frame 0
class Sandia extends FallingItem
{
var score, tipo, shake, removeMovieClip;
function Sandia () {
super();
score = 300;
tipo = "sandia";
}
function effect() {
_root.sB.playS("sandia_floor");
shake = _root.game.createEmptyMovieClip("shake", 200);
shake.count = 0;
shake.onEnterFrame = function () {
if (!_root.onPause) {
this.count++;
if ((this.count % 2) == 1) {
_root.game._y = 20 - this.count;
} else {
_root.game._y = 10;
}
if (this.count == 10) {
_root.game._y = 10;
this.removeMovieClip();
}
}
};
for (var _local3 in _root.game.fallingItems) {
if (_root.game.fallingItems[_local3].tipo == "banana") {
if (_root.game.fallingItems[_local3].onfloor == true) {
_root.game.fallingItems[_local3].effect();
}
}
}
removeMovieClip();
}
}
Symbol 315 MovieClip [__Packages.Banana] Frame 0
class Banana extends FallingItem
{
var score, tipo, onfloor, count, gotoAndPlay, onEnterFrame, swapDepths, _parent, _rotation, growthS;
function Banana () {
super();
score = 100;
tipo = "banana";
onfloor = false;
count = 0;
}
function effect() {
if (!onfloor) {
_root.sB.playS("banana_floor");
}
onfloor = true;
gotoAndPlay("bounce");
delete onEnterFrame;
}
function salirVolando() {
onfloor = false;
swapDepths(_parent.higherDepth());
_root.game.mono.resvalar();
_rotation = _rotation + Math.round(Math.random() * 360);
count = 0;
growthS = Math.round(Math.random() * 10);
onEnterFrame = function () {
if (!_root.onPause) {
this._y = this._y - 5;
this._width = this._width + this.growthS;
this._height = this._height + this.growthS;
this.count++;
if (this.count >= 10) {
this.removeMovieClip();
}
}
};
}
}
Symbol 316 MovieClip [__Packages.Estrella] Frame 0
class Estrella extends FallingItem
{
var score, tipo, removeMovieClip;
function Estrella () {
super();
score = 500;
tipo = "estrella";
}
function effect() {
_root.blink();
_root.sB.playS("star_floor");
removeMovieClip();
}
function burn() {
}
}
Symbol 317 MovieClip [__Packages.Pildora] Frame 0
class Pildora extends FallingItem
{
var score, tipo, angleX, suelo, _y, direccion, gotoAndPlay, onEnterFrame, _x, removeMovieClip;
function Pildora () {
super();
score = 300;
tipo = "pildora";
angleX = 0;
suelo = 490;
}
function effect() {
if (!_root.onPause) {
_root.sB.playS("pil_floor");
suelo = _y;
if (Math.random() < 0.5) {
direccion = -1;
gotoAndPlay("bounceleft");
} else {
direccion = 1;
gotoAndPlay("bounceright");
}
onEnterFrame = newPosition;
}
}
function newPosition() {
_x = _x + (10 * direccion);
_y = suelo - Math.abs(Math.sin((angleX = angleX + 0.3)) * 40);
if (angleX >= 3) {
angleX = 0;
_root.sB.playS("pil_floor");
}
if ((_x < 0) || (_x > 400)) {
removeMovieClip();
}
}
}
Symbol 318 MovieClip [__Packages.Flame] Frame 0
class Flame extends MovieClip
{
var stop, onEnterFrame;
function Flame () {
super();
stop();
onEnterFrame = function () {
if (_root.onPause) {
this.gotoAndStop(this._currentframe);
} else {
this.gotoAndStop(this._currentframe + 1);
for (var _local5 in _root.game.fallingItems) {
var _local3 = _root.game.fallingItems[_local5];
if ((this.hitTest(_local3) && (!_local3.burnt)) && (_local3.tipo != "estrella")) {
var _local4 = _root.game.scoreUp.pegar("scores", _local3._x, _local3._y);
_local4.gotoAndStop("score" + _local3.score);
_root.juego.scoreUp(_local3.score);
_local3.burn();
}
}
for (var _local5 in _root.game.men) {
if (this.hitTest(_root.game.men[_local5])) {
_root.game.men[_local5].burn();
}
}
}
};
}
}
Symbol 319 MovieClip [__Packages.ScoreUp] Frame 0
class ScoreUp extends MovieClip
{
var count, onEnterFrame, _y, removeMovieClip;
function ScoreUp () {
super();
count = 0;
onEnterFrame = goUp;
}
function goUp() {
if (!_root.onPause) {
_y--;
count++;
if (count >= 15) {
removeMovieClip();
}
}
}
}
Symbol 320 MovieClip [__Packages.Guardia] Frame 0
class Guardia extends MovieClip
{
var speed, quemado, activo, tipo, depth, onEnterFrame, _x, objetivo, chosenItem, arm, direccion, _y, count, fCount, gotoAndStop, newB, attachMovie;
function Guardia () {
super();
enfocar("derecha");
speed = 6;
quemado = false;
activo = false;
tipo = "guardia";
depth = 0;
nuevoObjetivo();
onEnterFrame = pasear;
}
function pasear() {
if (!_root.onPause) {
_x = _x + speed;
if (_x < 10) {
enfocar("derecha");
}
if (_x > 380) {
enfocar("izquierda");
}
}
}
function nuevoObjetivo() {
do {
objetivo = 20 + Math.round(Math.random() * 360);
} while (objetivo == _x);
enfocar(((objetivo > _x) ? "derecha" : "izquierda"));
}
function fire() {
if (((!quemado) && (_x > 5)) && (_x < 395)) {
activo = true;
chosenItem = ((Math.random() > 0.3) ? "banana" : (chooseSpecial()));
arm = _root.game.fallingItems.pegar("arm1" + direccion, _x, _y);
count = 0;
fCount = 8;
onEnterFrame = function () {
if (this.count >= this.fCount) {
_root.game.fallingItems.pegar(this.chosenItem, this._x, this._y + 20);
this.arm.removeMovieClip();
this.activo = false;
this.onEnterFrame = this.pasear;
}
this.count++;
};
}
}
function chooseSpecial() {
var _local1 = new Array();
_local1.push("estrella");
_local1.push("clock");
_local1.push("chilli");
_local1.push("sandia");
_local1.push("pildora");
return(_local1[Math.round(Math.random() * (_local1.length - 1))]);
}
function enfocar(direc) {
if (!quemado) {
direccion = direc;
if (direccion == "izquierda") {
speed = -Math.abs(speed);
gotoAndStop(direccion);
} else if (direccion == "derecha") {
speed = Math.abs(speed);
gotoAndStop(direccion);
}
}
}
function burn() {
if (!quemado) {
var _local3 = _root.game.scoreUp.pegar("scores", _x, _y);
_local3.gotoAndStop("score1000");
_root.juego.scoreUp(1000);
activo = true;
quemado = true;
arm.removeMovieClip();
gotoAndStop("quemado" + direccion);
count = 0;
onEnterFrame = function () {
if (!_root.onPause) {
this.count++;
if ((this.count % 10) == 0) {
this.smoke();
}
if (this.count >= 48) {
this.quemado = false;
this.enfocar(this.direccion);
this.activo = false;
this.onEnterFrame = this.pasear;
}
}
};
}
}
function smoke() {
newB = attachMovie("cloud", "cloud" + depth, depth++);
newB._alpha = 80;
newB._x = (Math.random() * 40) - 20;
newB._y = -30;
newB.onEnterFrame = function () {
this._y = this._y - 2;
if (this._y <= -50) {
this.removeMovieClip();
}
};
}
function origen(pos) {
switch (pos) {
case "left" :
_x = -10;
enfocar("izquierda");
break;
default :
_x = 410;
enfocar("derecha");
}
}
}
Symbol 321 MovieClip [__Packages.Mono] Frame 0
class Mono extends MovieClip
{
var keyRight, keyLeft, left, right, estado, star, onKeyDown, _x, dx, speed, direcc, gigante, gotoAndStop, ready, onEnterFrame, premio, _y, efecto, count, newFx, createEmptyMovieClip, _height;
function Mono () {
super();
keyRight = 39;
keyLeft = 37;
left = 15;
right = 385;
estado = "normal";
star = false;
resetMono();
onKeyDown = boton;
Key.addListener(this);
}
function moverPorPantalla() {
if (!_root.onPause) {
if (Key.isDown(keyRight) && (_x < right)) {
dx = dx + speed;
}
if (Key.isDown(keyLeft) && (_x > left)) {
dx = dx - speed;
}
direccion(dx);
if (Math.abs(dx) > 0) {
_x = _x + dx;
checkFloor();
dx = 0;
}
}
}
function direccion(cambioX) {
if (cambioX > 0) {
direcc = "derecha";
} else if (cambioX < 0) {
direcc = "izquierda";
} else {
direcc = "frente";
}
if (star) {
estado = (gigante ? "stargigante" : "star");
} else if (gigante) {
estado = "gigante";
} else {
estado = "normal";
}
gotoAndStop(estado + direcc);
}
function checkFloor() {
var _local3;
for (var _local4 in _root.game.fallingItems) {
_local3 = _root.game.fallingItems[_local4];
if (_local3.onfloor) {
if (Math.abs(_x - _local3._x) < 25) {
_local3.salirVolando();
}
}
}
}
function boton() {
if (!_root.onPause) {
if ((Key.getAscii() == 80) || (Key.getAscii() == 112)) {
_root.pauseGame();
} else if (Key.isDown(32)) {
abrirBoca();
}
}
}
function abrirBoca() {
if ((ready && (!star)) && (!_root.onPause)) {
gotoAndStop(estado + "abrirboca");
onEnterFrame = function () {
if (!_root.onPause) {
var _local3;
for (var _local4 in _root.game.fallingItems) {
_local3 = _root.game.fallingItems[_local4];
if ((_local3._y > 350) && (!_local3.onfloor)) {
if (this.mouth.hitTest(_local3)) {
this.comerObjeto(_local3);
}
}
}
this.count++;
if (this.count >= 30) {
this.acabarEfecto();
}
}
};
}
}
function comerObjeto(objeto) {
ready = false;
cerrarBoca(objeto.tipo);
prize(objeto.score);
objeto.removeMovieClip();
}
function prize(punts) {
premio = _root.game.scoreUp.pegar("scores", _x, (gigante ? (_y - 160) : (_y - 90)));
premio.gotoAndStop("score" + punts);
_root.juego.scoreUp(punts);
}
function cerrarBoca(accion) {
efecto = accion;
count = 0;
gotoAndStop(estado + "abrirboca");
onEnterFrame = function () {
this.count++;
if (this.count > 1) {
this.count = 0;
this.gotoAndStop(this.estado + "cerrarboca");
this.onEnterFrame = function () {
this.count++;
if (this.count >= 5) {
this[this.efecto]();
}
};
}
};
}
function resvalar() {
if (!star) {
_root.sB.playS("slide");
switch (direcc) {
case "izquierda" :
speed = -15;
direcc = "resvalarizquierda";
break;
case "derecha" :
speed = 15;
direcc = "resvalarderecha";
break;
default :
if (Math.random() < 0.5) {
speed = 15;
direcc = "resvalarderecha";
} else {
speed = -15;
direcc = "resvalarizquierda";
}
}
gotoAndStop(estado + direcc);
ready = false;
onEnterFrame = function () {
if (!_root.onPause) {
this._x = this._x + this.speed;
this.checkFloor();
if (this._x < (this.left - 100)) {
this.showClash(0);
} else if (this._x > (this.right + 100)) {
this.showClash(400);
}
}
};
}
}
function quemar() {
if (!star) {
_root.sB.playS("monkey_burn");
switch (direcc) {
case "izquierda" :
speed = 15;
direcc = "quemarderecha";
break;
case "derecha" :
speed = -15;
direcc = "quemarizquierda";
break;
default :
if (Math.random() < 0.5) {
speed = 15;
direcc = "quemarderecha";
} else {
speed = -15;
direcc = "quemarizquierda";
}
}
gotoAndStop(estado + direcc);
ready = false;
onEnterFrame = function () {
if (!_root.onPause) {
this._x = this._x + this.speed;
this.checkFloor();
if (this._x < (this.left - 100)) {
this.showClash(0);
} else if (this._x > (this.right + 100)) {
this.showClash(410);
}
}
};
}
}
function showClash(xpos) {
if (_root.juego.perderVida()) {
_root.sB.playS("sandia_floor");
delete onEnterFrame;
speed = 0;
var _local3 = _root.attachMovie("clash", "clash", 5100);
_local3._x = xpos;
_local3._y = _y + 5;
_local3.count = 0;
_local3.gotoAndStop(((_x > 0) ? 2 : 1));
_local3.onEnterFrame = function () {
this.count++;
if (this.count > 20) {
_root.game.mono.reapear();
this.removeMovieClip();
}
};
} else {
delete onEnterFrame;
}
}
function banana() {
_root.sB.playS("banana_fire");
acabarEfecto();
}
function chilli() {
_root.sB.playS("chilli_fire");
_root.game.shoot.pegar("flame", _x, ((estado == "gigante") ? (_y - 100) : (_y - 50)));
gotoAndStop(estado + "fireing");
ready = false;
count = 0;
onEnterFrame = function () {
if (!_root.onPause) {
this.count++;
if (this.count >= 15) {
this.acabarEfecto();
}
}
};
}
function sandia() {
_root.sB.playS("sandia_fire");
gigante = true;
estado = "gigante";
acabarEfecto();
newFx = createEmptyMovieClip("gigante", 100);
newFx.count = 0;
newFx.onEnterFrame = function () {
if (!_root.onPause) {
this.count++;
if (this.count >= 100) {
this._parent.gigante = false;
this.removeMovieClip();
}
}
};
}
function clock() {
_root.sB.playS("clock_fire");
_root.slow();
_root.game.scoreUp.pegar("clockghost", _x, ((estado == "gigante") ? (_y - 100) : (_y - 50)));
acabarEfecto();
}
function pildora() {
_root.sB.playS("pil_fire");
speed = 40;
newFx = createEmptyMovieClip("velcocidad", 21);
newFx.count = 0;
newFx.onEnterFrame = function () {
if (!_root.onPause) {
this._parent.spark();
this.count++;
if (((this.count >= 100) || (this._parent._x < (this._parent.left - 50))) || (this._parent._x > (this._parent.right + 100))) {
this._parent.speed = 10;
this.removeMovieClip();
}
}
};
acabarEfecto();
}
function spark() {
newFx = _root.game.scoreUp.pegar("spark", _x, _y - (Math.random() * _height));
newFx.count = 0;
newFx.onEnterFrame = function () {
if (!_root.onPause) {
this.count++;
if (this.count >= 10) {
this.removeMovieClip();
}
}
};
}
function estrella() {
_root.sB.playS("star_fire");
acabarEfecto();
star = true;
newFx = createEmptyMovieClip("aura", 20);
newFx.count = 0;
newFx.onEnterFrame = function () {
if (!_root.onPause) {
for (var _local3 in _root.game.fallingItems) {
if (this._parent.hitTest(_root.game.fallingItems[_local3])) {
this._parent.prize(_root.game.fallingItems[_local3].score);
_root.game.fallingItems[_local3].removeMovieClip();
}
}
this.count++;
if (this.count > 80) {
this._parent.star = false;
this.removeMovieClip();
}
}
};
}
function reapear() {
gigante = false;
estado = "normal";
resetMono();
estrella();
var _local2 = createEmptyMovieClip("blink", 22);
_local2.aCount = 0;
_local2.count = 0;
_local2.onEnterFrame = function () {
this.aCount++;
if (this.aCount >= 2) {
this._parent._alpha = 0;
}
if (this.aCount >= 3) {
this.aCount = 0;
this.count++;
this._parent._alpha = 100;
if (this.count >= 7) {
this._parent._alpha = 100;
this.removeMovieClip();
}
}
};
}
function speedChange(nuevaVelocidad) {
speed = nuevaVelocidad;
}
function resetSpeed() {
speed = 10;
dx = 0;
}
function acabarEfecto() {
count = 0;
ready = true;
gotoAndStop(estado + "frente");
onEnterFrame = moverPorPantalla;
}
function resetMono() {
resetSpeed();
acabarEfecto();
_x = 200;
}
}
Symbol 322 MovieClip [__Packages.SLayer] Frame 0
class SLayer extends MovieClip
{
var depth, newB, attachMovie;
function SLayer () {
super();
depth = 0;
}
function pegar(bicho, xPos, yPos) {
newB = attachMovie(bicho, bicho + depth, higherDepth());
newB._x = xPos;
newB._y = yPos;
return(newB);
}
function higherDepth() {
depth++;
if (depth >= 10000) {
depth = 0;
}
return(depth);
}
function meet(pelicula) {
for (var _local4 in this) {
if (_root[pelicula].hitTest(this[_local4])) {
_root[pelicula].reaccion();
this[_local4].reaccion();
}
}
}
}
Symbol 48 MovieClip [sLayer] Frame 1
#initclip 30
Object.registerClass("sLayer", SLayer);
#endinitclip
Symbol 50 MovieClip [chilli] Frame 1
#initclip 19
Object.registerClass("chilli", Chilli);
#endinitclip
Symbol 50 MovieClip [chilli] Frame 16
this.removeMovieClip();
Symbol 53 MovieClip [clock] Frame 1
#initclip 20
Object.registerClass("clock", Clock);
#endinitclip
Symbol 53 MovieClip [clock] Frame 10
this.removeMovieClip();
Symbol 55 MovieClip [sandia] Frame 1
#initclip 21
Object.registerClass("sandia", Sandia);
#endinitclip
Symbol 55 MovieClip [sandia] Frame 10
this.removeMovieClip();
Symbol 58 MovieClip [banana] Frame 1
#initclip 22
Object.registerClass("banana", Banana);
#endinitclip
Symbol 58 MovieClip [banana] Frame 8
this.removeMovieClip();
Symbol 58 MovieClip [banana] Frame 20
stop();
Symbol 60 MovieClip [estrella] Frame 1
#initclip 23
Object.registerClass("estrella", Estrella);
#endinitclip
Symbol 65 MovieClip [pildora] Frame 1
#initclip 24
Object.registerClass("pildora", Pildora);
#endinitclip
Symbol 65 MovieClip [pildora] Frame 9
this.gotoAndPlay("bounceright");
Symbol 65 MovieClip [pildora] Frame 17
this.gotoAndPlay("bounceleft");
Symbol 65 MovieClip [pildora] Frame 30
this.removeMovieClip();
Symbol 72 MovieClip [flame] Frame 1
#initclip 25
Object.registerClass("flame", Flame);
#endinitclip
Symbol 72 MovieClip [flame] Frame 20
this.removeMovieClip();
Symbol 86 MovieClip [scores] Frame 1
#initclip 26
Object.registerClass("scores", ScoreUp);
#endinitclip
Symbol 89 MovieClip [clockghost] Frame 10
this.removeMovieClip();
Symbol 105 MovieClip [negativeScores] Frame 1
#initclip 27
Object.registerClass("negativeScores", ScoreUp);
#endinitclip
Symbol 113 MovieClip [guardia] Frame 1
#initclip 28
Object.registerClass("guardia", Guardia);
#endinitclip
Symbol 162 MovieClip [monoOsCojone] Frame 1
#initclip 29
Object.registerClass("monoOsCojone", Mono);
#endinitclip
Symbol 164 MovieClip [arm1derecha] Frame 7
this.removeMovieClip();
Symbol 226 Button
on (release) {
getURL ("http://www.pixelgo.com/", "_blank");
}
Symbol 232 Button
on (release) {
getURL ("http://jayisgames.com/", "_blank");
}
Symbol 267 Button
on (rollOver) {
_root.sB.playS("roll_over");
}
on (release) {
_root.sB.playS("press");
_root.gotoAndPlay("intro");
}