Frame 1
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
percentbytes = int(loadedbytes / (totalbytes / 100));
tellTarget (_root.loader) {
gotoAndStop(_root.percentbytes);
};
Frame 2
if (loadedbytes == totalbytes) {
gotoAndStop (3);
} else {
gotoAndPlay (1);
}
Frame 3
stop();
meep = new ContextMenu();
meep.hideBuiltInItems();
_root.menu = meep;
Instance of Symbol 15 MovieClip "topctrl" in Frame 3
onClipEvent (load) {
top = 0;
}
Instance of Symbol 15 MovieClip "mctrl" in Frame 3
onClipEvent (load) {
musica = new Sound();
musica.attachSound("fondo");
musica.start(0, 999999);
musica.setVolume(80);
}
Instance of Symbol 50 MovieClip "credits" in Frame 3
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 89 MovieClip "inst" in Frame 3
onClipEvent (load) {
this._visible = false;
}
Frame 4
function checkFPS(refreshRate) {
function getFPS(c) {
c.fps = c.i / c.refreshRate;
c.i = 0;
c.output.text = "FPS..................." + c.fps;
}
var _local5 = 0;
var _local3 = 0;
var _local6 = 180;
var _local4 = 18;
var _local2 = this.createEmptyMovieClip("fpsCounter", 100000);
_local2._x = _local5;
_local2._y = _local3;
_local2.createTextField("output", 0, 0, 0, _local6, _local4);
_local2.fps = _local2.i;
_local2.refreshRate = refreshRate;
_local2.onEnterFrame = function () {
this.i++;
};
_local2.interval = setInterval(getFPS, refreshRate * 1000, fpsCounter);
}
stop();
meep = new ContextMenu();
meep.hideBuiltInItems();
_root.menu = meep;
Instance of Symbol 115 MovieClip "edificio" in Frame 4
onClipEvent (load) {
music = true;
cant = 0;
timer = 0;
gameover = false;
musica = new Sound();
musica.attachSound("fondo2");
musica.start(0, 999999);
musica.setVolume(50);
salvo = new Sound();
salvo.attachSound("bbsano");
}
onClipEvent (enterFrame) {
if (gameover == false) {
level = Math.random() * 10;
if ((level > 6) && (timer == 0)) {
_root.bebe.duplicateMovieClip("bebe" + cant, cant);
_root["bebe" + cant]._visible = true;
_root["bebe" + cant].muerto = false;
altura = random(cant);
if ((altura >= 2) && (altura < 4)) {
_root.tv.duplicateMovieClip("tv" + cant, cant);
_root["tv" + cant]._visible = true;
_root["tv" + cant].muerto = false;
_root["tv" + cant].h = -9.5;
_root["tv" + cant]._x = 58.6;
_root["tv" + cant]._y = 120;
} else if ((altura >= 15) && (altura < 25)) {
_root.tv.duplicateMovieClip("tv" + cant, cant);
_root["tv" + cant]._visible = true;
_root["tv" + cant].muerto = false;
_root["tv" + cant].h = -11.5;
_root["tv" + cant]._x = 58.6;
_root["tv" + cant]._y = 50;
} else if (altura > 38) {
_root.tv.duplicateMovieClip("tv" + cant, cant);
_root["tv" + cant]._visible = true;
_root["tv" + cant].muerto = false;
_root["tv" + cant].h = -8;
_root["tv" + cant]._x = 58.6;
_root["tv" + cant]._y = 189.9;
}
if ((altura <= 10) || (altura > 21)) {
_root["bebe" + cant].h = -11.5;
_root["bebe" + cant]._x = 58.6;
_root["bebe" + cant]._y = 50;
} else if ((altura > 10) && (altura < 18)) {
_root["bebe" + cant].h = -9.5;
_root["bebe" + cant]._x = 58.6;
_root["bebe" + cant]._y = 120;
} else if ((altura >= 18) && (altura <= 21)) {
_root["bebe" + cant].h = -8;
_root["bebe" + cant]._x = 58.6;
_root["bebe" + cant]._y = 189.9;
}
cant++;
}
timer++;
if (timer == 45) {
timer = 0;
}
}
}
Instance of Symbol 122 MovieClip "gameover" in Frame 4
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 81 MovieClip "grupo" in Frame 4
onClipEvent (load) {
vidas = 10;
score = 0;
prevscore = score;
gameover = false;
wrong = false;
wcont = 0;
w = 0;
}
onClipEvent (enterFrame) {
score = Math.round(score);
if (gameover == false) {
if (wrong == false) {
if (Key.isDown(39)) {
_root.grupo.gotoAndStop(2);
if (this._x < 357) {
_root.grupo._x = _root.grupo._x + 7;
} else {
this_x = 357;
}
} else if (Key.isDown(37)) {
_root.grupo.gotoAndStop(3);
if (this._x > 100) {
_root.grupo._x = _root.grupo._x - 7;
} else {
this._x = 100;
}
} else {
_root.grupo.gotoAndStop(1);
}
if ((score - prevscore) >= 1000) {
vidas++;
prevscore = score;
}
} else {
this.gotoandstop(1);
w++;
this._alpha = 100;
if (w == 5) {
this._alpha = 0;
w = 0;
wcont++;
}
if (wcont == 5) {
wcont = 0;
w = 0;
wrong = false;
this._alpha = 100;
}
}
if (vidas <= 0) {
vidas = 0;
_root.edificio.gameover = true;
this.gameover = true;
_root.gameover._visible = true;
if (_root.topctrl.top < this.score) {
_root.topctrl.top = this.score;
}
}
}
}
Instance of Symbol 67 MovieClip "bebe" in Frame 4
onClipEvent (load) {
g = 0.2;
a = 0;
v = 0;
}
onClipEvent (enterFrame) {
if (muerto == false) {
a = a + g;
this._y = this._y + a;
this._x = this._x + 1.5;
this._rotation = this._rotation + (h + 2);
if (this.hitTest(_root.ambulancia)) {
_root.grupo.score = _root.grupo.score + (100 + (5 * h));
this.muerto = true;
_root.edificio.salvo.start();
this._visible = false;
}
} else {
v++;
if (v == 34) {
this._visible = false;
}
}
if (this.hitTest(_root.grupo.trampo)) {
a = h;
_root.grupo.trampo.play();
}
if (this._y > 380) {
_root.grupo.vidas--;
this._y = 380;
muerto = true;
if (h == -11.5) {
this._rotation = 0;
this.gotoAndPlay(2);
} else if (h == -9.5) {
this._rotation = 0;
this.gotoAndPlay(21);
} else if (h == -8) {
this.gotoAndPlay(37);
}
}
}
Instance of Symbol 134 MovieClip in Frame 4
onClipEvent (load) {
music = true;
}
on (press) {
if (music == true) {
gotoAndStop (2);
_root.edificio.musica.stop();
music = false;
} else {
gotoAndStop (1);
_root.edificio.musica.start(0, 999999);
musica.setVolume(50);
music = true;
}
}
Instance of Symbol 88 MovieClip "tv" in Frame 4
onClipEvent (load) {
g = 0.2;
a = 0;
v = 0;
}
onClipEvent (enterFrame) {
if (muerto == false) {
a = a + g;
this._y = this._y + a;
this._x = this._x + 1.5;
} else {
v++;
if (v == 34) {
this._visible = false;
}
}
if (this.hitTest(_root.grupo.trampo)) {
a = h;
_root.grupo.trampo.play();
_root.grupo.wrong = true;
}
if (this._y > 380) {
this._y = 380;
muerto = true;
this.gotoAndPlay(2);
}
}
Symbol 29 Button
on (release) {
_root.mctrl.musica.stop();
gotoAndPlay (4);
}
Symbol 33 Button
on (release) {
_root.inst._visible = true;
}
Symbol 37 Button
on (release) {
_root.credits._visible = true;
}
Instance of Symbol 49 MovieClip in Symbol 50 MovieClip Frame 1
on (release) {
_root.credits._visible = false;
}
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 14
stop();
Symbol 67 MovieClip Frame 35
stop();
Symbol 67 MovieClip Frame 51
stop();
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 20
gotoAndStop (1);
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 29
gotoAndPlay (5);
Symbol 80 MovieClip Frame 57
gotoAndPlay (33);
Symbol 81 MovieClip Frame 1
bomb1.gotoAndStop(1);
bomb2.gotoAndStop(1);
stop();
Symbol 81 MovieClip Frame 2
bomb1.gotoAndPlay(2);
bomb2.gotoAndPlay(30);
stop();
Symbol 81 MovieClip Frame 3
bomb1.gotoAndPlay(30);
bomb2.gotoAndPlay(2);
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 37
stop();
Instance of Symbol 49 MovieClip in Symbol 89 MovieClip Frame 1
on (release) {
_root.inst._visible = false;
}
Instance of Symbol 67 MovieClip in Symbol 89 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (14);
}
Symbol 121 Button
on (release) {
_root.edificio.musica.stop();
_root.gotoAndStop(3);
}
Symbol 134 MovieClip Frame 1
stop();