Combined Code
movieClip 11 {
}
movieClip 16 {
}
movieClip 18 {
}
movieClip 24 {
frame 24 {
stop();
}
}
movieClip 27 {
}
movieClip 36 {
}
movieClip 37 {
}
movieClip 38 {
}
movieClip 72 {
}
movieClip 76 {
}
frame 101 {
startDrag('/linea', true, 610, 50, 30, 380);
stop();
}
movieClip 82 {
frame 6 {
stop();
}
}
movieClip 86 {
}
movieClip 87 {
}
button 90 {
on (release) {
gotoAndPlay(121);
}
}
button 91 {
on (release) {
gotoAndPlay(102);
}
}
movieClip 93 {
}
frame 119 {
stop();
}
button 100 {
on (release) {
nextFrame();
}
}
frame 120 {
stop();
}
movieClip 110 {
}
movieClip 123 {
frame 6 {
if (20 < /:TimeInmortal) {
gotoAndPlay(1);
}
}
frame 12 {
gotoAndPlay(7);
}
}
movieClip 127 {
}
movieClip 131 {
}
movieClip 135 {
}
movieClip 150 {
}
movieClip 155 {
}
movieClip 160 {
}
button 164 {
on (release) {
prevFrame();
}
}
button 166 {
on (release) {
gotoAndStop(101);
}
}
frame 121 {
Gravedad = 1;
XInc = 10;
DupsIdx = 0;
dx = 0;
while (dx < 2) {
++dx;
Dups = 'Bola1_' add dx;
duplicateMovieClip('BolaG1', Dups, DupsIdx);
++DupsIdx;
}
dx = 0;
while (dx < 4) {
++dx;
Dups = 'Bola2_' add dx;
duplicateMovieClip('BolaG2', Dups, DupsIdx);
++DupsIdx;
}
dx = 0;
while (dx < 8) {
++dx;
Dups = 'Bola3_' add dx;
duplicateMovieClip('BolaG3', Dups, DupsIdx);
++DupsIdx;
}
dx = 0;
while (dx < 16) {
++dx;
Dups = 'Bola4_' add dx;
duplicateMovieClip('BolaG4', Dups, DupsIdx);
++DupsIdx;
}
Bolas1Max = 2;
Bolas2Max = 4;
Bolas3Max = 8;
Bolas4Max = 16;
BolaG1._visible = false;
BolaG2._visible = false;
BolaG3._visible = false;
BolaG4._visible = false;
duplicateMovieClip('Pieza', 'Pieza01', DupsIdx);
Pos1_01X = 45;
Pos1_01Y = 185;
Rect1_01MaxX = 192;
Rect1_01MinX = 13;
Rect1_01MaxY = 195;
Rect1_01MinY = 180;
++DupsIdx;
duplicateMovieClip('Pieza', 'Pieza02', DupsIdx);
Pos1_02X = 133;
Pos1_02Y = 185;
Rect1_02MaxX = 192;
Rect1_02MinX = 13;
Rect1_02MaxY = 195;
Rect1_02MinY = 180;
++DupsIdx;
duplicateMovieClip('Pieza', 'Pieza03', DupsIdx);
Pos1_03X = 526;
Pos1_03Y = 185;
Rect1_03MaxX = 585;
Rect1_03MinX = 494;
Rect1_03MaxY = 195;
Rect1_03MinY = 180;
++DupsIdx;
Pieza._visible = false;
Pos2_01X = 250;
Pos2_01Y = 185;
Rect2_01MaxX = 397;
Rect2_01MinX = 218;
Rect2_01MaxY = 195;
Rect2_01MinY = 180;
Pos2_02X = 338;
Pos2_02Y = 185;
Rect2_02MaxX = 397;
Rect2_02MinX = 218;
Rect2_02MaxY = 195;
Rect2_02MinY = 180;
Pos2_03X = 338;
Pos2_03Y = 185;
Rect2_03MaxX = 397;
Rect2_03MinX = 218;
Rect2_03MaxY = 195;
Rect2_03MinY = 180;
/Obj1._visible = false;
/Obj2._visible = false;
/Obj3._visible = false;
/Obj4._visible = false;
/Obj5._visible = false;
/Obj6._visible = false;
/Obj7._visible = false;
/Obj8._visible = false;
}
movieClip 171 {
}
movieClip 172 {
frame 1 {
stop();
}
frame 15 {
stop();
}
}
movieClip 175 {
frame 1 {
stop();
}
frame 15 {
stop();
}
}
movieClip 176 {
frame 1 {
stop();
}
frame 15 {
stop();
}
}
movieClip 179 {
frame 1 {
stop();
}
frame 12 {
stop();
}
}
movieClip 180 {
}
movieClip 203 {
}
movieClip 209 {
}
movieClip 210 {
frame 8 {
gotoAndPlay(1);
}
frame 16 {
gotoAndPlay(9);
}
frame 17 {
stop();
}
frame 28 {
gotoAndStop(17);
}
frame 59 {
/:Muere = 3;
stop();
}
}
movieClip 211 {
frame 6 {
if (20 < /:TimeInmortal) {
gotoAndPlay(1);
}
}
frame 12 {
gotoAndPlay(7);
}
}
movieClip 212 {
}
movieClip 213 {
}
movieClip 214 {
}
movieClip 215 {
}
movieClip 222 {
}
movieClip 223 {
}
movieClip 224 {
frame 1 {
stop();
}
}
movieClip 226 {
frame 1 {
stop();
}
frame 12 {
stop();
}
}
movieClip 228 {
frame 1 {
stop();
}
frame 15 {
stop();
}
}
movieClip 230 {
frame 1 {
stop();
}
frame 5 {
stop();
}
}
movieClip 232 {
frame 1 {
stop();
}
frame 7 {
gotoAndPlay(2);
}
}
movieClip 234 {
frame 1 {
stop();
}
frame 20 {
stop();
}
}
movieClip 236 {
frame 1 {
stop();
}
frame 15 {
stop();
}
}
movieClip 238 {
frame 1 {
stop();
}
frame 34 {
stop();
}
}
movieClip 240 {
frame 1 {
stop();
}
frame 36 {
stop();
}
}
movieClip 242 {
frame 1 {
stop();
}
frame 30 {
gotoAndPlay(2);
}
}
movieClip 244 {
frame 1 {
stop();
}
frame 9 {
stop();
}
}
movieClip 246 {
frame 1 {
stop();
}
frame 24 {
stop();
}
}
frame 122 {
Vidas = 3;
score = 0;
Nivel = 0;
BolaG1._visible = false;
BolaG2._visible = false;
BolaG3._visible = false;
BolaG4._visible = false;
Pieza._visible = false;
Pieza01._visible = true;
Pieza02._visible = true;
Pieza03._visible = true;
/Obj1._visible = false;
/Obj2._visible = false;
/Obj3._visible = false;
/Obj4._visible = false;
/Obj5._visible = false;
/Obj6._visible = false;
/Obj7._visible = false;
/Obj8._visible = false;
}
frame 123 {
CountBalls = 0;
TimeInmortal = 50;
ObjCountInit = 10;
ObjCount = ObjCountInit;
ObjNum = 0;
ObjX = 0;
ObjY = 0;
ObjIncY = 0;
ObjView = false;
Arma = 0;
Muere = 0;
Move = 0;
++Nivel;
if (Nivel % 2 == 1) {
Pos01X = Pos2_01X;
Pos01Y = Pos2_01Y;
Rect01MaxX = Rect2_01MaxX;
Rect01MinX = Rect2_01MinX;
Rect01MaxY = Rect2_01MaxY;
Rect01MinY = Rect2_01MinY;
Pos02X = Pos2_02X;
Pos02Y = Pos2_02Y;
Rect02MaxX = Rect2_02MaxX;
Rect02MinX = Rect2_02MinX;
Rect02MaxY = Rect2_02MaxY;
Rect02MinY = Rect2_02MinY;
Pos03X = Pos2_03X;
Pos03Y = Pos2_03Y;
Rect03MaxX = Rect2_03MaxX;
Rect03MinX = Rect2_03MinX;
Rect03MaxY = Rect2_03MaxY;
Rect03MinY = Rect2_03MinY;
} else {
Pos01X = Pos1_01X;
Pos01Y = Pos1_01Y;
Rect01MaxX = Rect1_01MaxX;
Rect01MinX = Rect1_01MinX;
Rect01MaxY = Rect1_01MaxY;
Rect01MinY = Rect1_01MinY;
Pos02X = Pos1_02X;
Pos02Y = Pos1_02Y;
Rect02MaxX = Rect1_02MaxX;
Rect02MinX = Rect1_02MinX;
Rect02MaxY = Rect1_02MaxY;
Rect02MinY = Rect1_02MinY;
Pos03X = Pos1_03X;
Pos03Y = Pos1_03Y;
Rect03MaxX = Rect1_03MaxX;
Rect03MinX = Rect1_03MinX;
Rect03MaxY = Rect1_03MaxY;
Rect03MinY = Rect1_03MinY;
}
Pieza01._x = Pos01X;
Pieza01._y = Pos01Y;
Pieza02._x = Pos02X;
Pieza02._y = Pos02Y;
Pieza03._x = Pos03X;
Pieza03._y = Pos03Y;
dx = 0;
while (dx < 2) {
++dx;
Dups = 'Bola1_' add dx;
eval(Dups add 'X') = BolaG1._x - (dx - 1) * 50;
eval(Dups add 'Y') = BolaG1._y;
eval(Dups add 'IncX') = 5 - (dx % 2) * 10;
eval(Dups add 'IncY') = 0;
if (dx == 1 or dx == 2 and 6 < Nivel) {
eval(Dups add 'Exists') = 1;
eval(Dups)._visible = true;
} else {
eval(Dups add 'Exists') = 0;
eval(Dups)._visible = false;
}
tellTarget ('Dups') {
gotoAndStop(1);
}
}
dx = 0;
while (dx < 4) {
++dx;
Dups = 'Bola2_' add dx;
eval(Dups add 'X') = BolaG2._x - (dx - 1) * 40;
eval(Dups add 'Y') = BolaG2._y;
eval(Dups add 'IncX') = 5 - (dx % 2) * 10;
eval(Dups add 'IncY') = 0;
if (dx == 1 and (Nivel == 5 or Nivel == 6)) {
eval(Dups add 'Exists') = 1;
eval(Dups)._visible = true;
} else {
eval(Dups add 'Exists') = 0;
eval(Dups)._visible = false;
}
tellTarget ('Dups') {
gotoAndStop(1);
}
}
dx = 0;
while (dx < 8) {
++dx;
Dups = 'Bola3_' add dx;
eval(Dups add 'X') = BolaG3._x - (dx - 1) * 25;
eval(Dups add 'Y') = BolaG3._y;
eval(Dups add 'IncX') = 5 - (dx % 2) * 10;
eval(Dups add 'IncY') = 0;
if (dx == 1 and (Nivel == 3 or Nivel == 4)) {
eval(Dups add 'Exists') = 1;
eval(Dups)._visible = true;
} else {
eval(Dups add 'Exists') = 0;
eval(Dups)._visible = false;
}
tellTarget ('Dups') {
gotoAndStop(1);
}
}
dx = 0;
while (dx < 16) {
++dx;
Dups = 'Bola4_' add dx;
eval(Dups add 'X') = BolaG4._x - (dx - 1) * 20;
eval(Dups add 'Y') = BolaG4._y;
eval(Dups add 'IncX') = 5 - (dx % 2) * 10;
eval(Dups add 'IncY') = 0;
eval(Dups add 'Exists') = 0;
eval(Dups)._visible = false;
tellTarget ('Dups') {
gotoAndStop(1);
}
}
tellTarget ('/pang') {
gotoAndPlay('Parado');
}
Disp1 = 0;
Disp2 = 0;
TimeDisp = 100;
TimeDisp1 = 0;
TimeDisp2 = 0;
/Obj1._visible = false;
/Obj2._visible = false;
/Obj3._visible = false;
/Obj4._visible = false;
/Obj5._visible = false;
/Obj6._visible = false;
/Obj7._visible = false;
/Obj8._visible = false;
tellTarget ('/sndBurbuja') {
gotoAndPlay(2);
}
BolaG1._visible = false;
BolaG2._visible = false;
BolaG3._visible = false;
BolaG4._visible = false;
Pieza._visible = false;
Pieza01._visible = true;
Pieza02._visible = true;
Pieza03._visible = true;
}
frame 129 {
if (0 < ObjCount) {
--ObjCount;
} else {
if (ObjCount == 0) {
ObjX = Math.round(Math.random() * 520 + 30);
ObjY = 60;
ObjIncY = 0;
ObjNum = Math.round(Math.random() * 7 + 1);
ObjView = true;
ObjCount = -1;
ObjName = 'Obj' add ObjNum;
eval(ObjName)._x = ObjX;
eval(ObjName)._y = ObjY;
eval(ObjName)._visible = true;
} else {
if (ObjCount < 0 and ObjView == true) {
call('MoveObj');
}
}
}
if (0 < TimeInmortal) {
if (TimeInmortal == 50) {
tellTarget ('/Burbuja') {
gotoAndPlay(1);
}
}
TimeInmortal -= 1;
/Burbuja._visible = true;
} else {
tellTarget ('/sndBurbuja') {
gotoAndStop(1);
}
/Burbuja._visible = false;
}
call('MoveDisps');
call('MoveBalls');
if (CountBalls == 0) {
gotoAndPlay(142);
} else {
if (Vidas == 0) {
gotoAndPlay(230);
} else {
tellTarget ('/vidas') {
gotoAndPlay(4 - /:Vidas);
}
Tecla = 0;
if (Key.isDown(Key.RIGHT)) {
Tecla = 1;
} else {
if (Key.isDown(Key.LEFT)) {
Tecla = 2;
}
}
if (Key.isDown(Key.UP) or Key.isDown(Key.SPACE)) {
Tecla = 3;
}
XPos = Number(/pang._x);
if (Muere == 1) {
tellTarget ('/sndMuerte') {
gotoAndPlay(2);
}
Muere = 2;
tellTarget ('/pang') {
gotoAndPlay('muere');
}
tellTarget ('/sndPaso') {
gotoAndStop(1);
}
} else {
if (Muere == 2) {
} else {
if (Muere == 3) {
TimeInmortal = 50;
tellTarget ('/pang') {
gotoAndPlay('Parado');
}
Muere = 0;
tellTarget ('/sndBurbuja') {
gotoAndPlay(2);
}
} else {
if (Tecla == 1) {
if (Move != 1) {
tellTarget ('/sndPaso') {
gotoAndPlay(2);
}
tellTarget ('/pang') {
gotoAndPlay('derecha');
}
Move = 1;
}
XPos += XInc;
if (560 < XPos) {
XPos = 560;
}
/pang._x = XPos;
/Burbuja._x = XPos;
} else {
if (Tecla == 2) {
if (Move != 2) {
tellTarget ('/sndPaso') {
gotoAndPlay(2);
}
tellTarget ('/pang') {
gotoAndPlay('izquierda');
}
Move = 2;
}
XPos -= XInc;
if (XPos < 34) {
XPos = 34;
}
/pang._x = XPos;
/Burbuja._x = XPos;
} else {
if (Tecla == 3) {
tellTarget ('/sndPaso') {
gotoAndStop(1);
}
if (Move != 3) {
tellTarget ('/pang') {
gotoAndPlay('dispara');
}
if (Disp1 == 0) {
if (Arma == 0) {
tellTarget ('/sndDisp1') {
gotoAndPlay(2);
}
Disparo._x = Number(/pang._x) + 3;
Disparo._y = 332;
tellTarget ('Disparo') {
gotoAndPlay(2);
}
} else {
if (Arma == 1) {
tellTarget ('/sndDisp2') {
gotoAndPlay(2);
}
Disparo2-1._x = Number(/pang._x) + 3;
Disparo2-1._y = 332;
tellTarget ('Disparo2-1') {
gotoAndPlay(2);
}
}
}
Disp1 = 1;
} else {
if (Disp2 == 0) {
if (Arma == 0) {
tellTarget ('/sndDisp1') {
gotoAndPlay(2);
}
Disparo2._x = Number(/pang._x) + 3;
Disparo2._y = 332;
tellTarget ('Disparo2') {
gotoAndPlay(2);
}
} else {
if (Arma == 1) {
tellTarget ('/sndDisp2') {
gotoAndPlay(2);
}
Disparo2-2._x = Number(/pang._x) + 3;
Disparo2-2._y = 332;
tellTarget ('Disparo2-2') {
gotoAndPlay(2);
}
}
}
Disp2 = 1;
}
}
Move = 3;
}
} else {
tellTarget ('/sndPaso') {
gotoAndStop(1);
}
tellTarget ('/pang') {
gotoAndPlay('Parado');
}
Move = 0;
}
}
}
}
}
}
prevFrame();
play();
}
}
}
frame 130 {
stop();
}
frame 134 {
if (ObjY >= 315 and 0 < ObjIncY) {
if (4 < ObjIncY) {
ObjIncY = -(ObjIncY * 0.5);
ObjY += ObjIncY;
tellTarget ('/sndBote') {
gotoAndPlay(2);
}
} else {
ObjIncY = 0;
ObjY = 315;
eval(ObjName)._visible = false;
ObjCount = -1;
ObjNum = 0;
ObjX = 0;
ObjY = 0;
ObjIncY = 0;
ObjView = false;
ObjName = '';
}
} else {
ObjY += ObjIncY;
ObjIncY += Gravedad;
}
eval(ObjName)._y = ObjY;
MaxX = Pang._x + 20;
MinX = Pang._x - 20;
MaxY = Pang._y + 30;
MinY = Pang._y - 30;
BallX = ObjX;
BallY = ObjY;
BallR = 10;
call('CheckCollision');
if (0 < Res) {
eval(ObjName)._visible = false;
if (ObjNum == 1) {
tellTarget ('/sndBomba') {
gotoAndPlay(2);
}
call('ExplotaTodo');
} else {
if (ObjNum == 2) {
tellTarget ('/sndCogeArma') {
gotoAndPlay(2);
}
Arma = 1;
tellTarget ('Disparo') {
gotoAndStop(1);
}
tellTarget ('Disparo2-1') {
gotoAndStop(1);
}
Disp1 = 0;
tellTarget ('Disparo2') {
gotoAndStop(1);
}
tellTarget ('Disparo2-2') {
gotoAndStop(1);
}
Disp2 = 0;
} else {
if (ObjNum == 3) {
tellTarget ('/sndCogeArma') {
gotoAndPlay(2);
}
Arma = 0;
tellTarget ('Disparo') {
gotoAndStop(1);
}
tellTarget ('Disparo2-1') {
gotoAndStop(1);
}
Disp1 = 0;
tellTarget ('Disparo2') {
gotoAndStop(1);
}
tellTarget ('Disparo2-2') {
gotoAndStop(1);
}
Disp2 = 0;
} else {
if (ObjNum == 4) {
tellTarget ('/sndVida') {
gotoAndPlay(2);
}
++Vidas;
} else {
if (ObjNum == 5) {
tellTarget ('/sndBurbuja') {
gotoAndPlay(2);
}
TimeInmortal = 50;
} else {
if (ObjNum == 6) {
tellTarget ('/sndDinero') {
gotoAndPlay(2);
}
score += 300;
} else {
if (ObjNum == 7) {
tellTarget ('/sndDinero') {
gotoAndPlay(2);
}
score += 500;
} else {
if (ObjNum == 8) {
tellTarget ('/sndDinero') {
gotoAndPlay(2);
}
score += 1000;
}
}
}
}
}
}
}
}
ObjCount = -1;
ObjNum = 0;
ObjX = 0;
ObjY = 0;
ObjIncY = 0;
ObjView = false;
ObjName = '';
}
}
frame 135 {
CountBalls = 0;
dx = 0;
while (dx < Bolas1Max) {
++dx;
Dups = 'Bola1_' add dx;
if (eval(Dups add 'Exists') == 1) {
++CountBalls;
BallR = 50;
call('CheckCollisionAll');
if (Res == 1) {
if (eval(Dups add 'IncX') < 0) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 2) {
if (0 < eval(Dups add 'IncX')) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 3) {
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 100) {
tellTarget ('/sndExplo') {
gotoAndPlay(2);
}
if (ObjCount < 0 and ObjView == false) {
ObjCount = ObjCountInit;
}
score += 10;
eval(Dups add 'Exists') = 0;
tellTarget ('Dups') {
gotoAndPlay(2);
}
dy = 0;
count = 0;
while (dy < 4 and count < 2) {
++dy;
Dups2 = 'Bola2_' add dy;
if (eval(Dups2 add 'Exists') == 0) {
++count;
eval(Dups2 add 'X') = eval(Dups add 'X');
eval(Dups2 add 'Y') = eval(Dups add 'Y');
eval(Dups2 add 'IncX') = 5 - (count % 2) * 10;
eval(Dups2 add 'IncY') = -5;
eval(Dups2 add 'Exists') = 1;
eval(Dups2)._visible = true;
tellTarget ('Dups2') {
gotoAndStop(1);
}
}
}
}
}
}
}
if (535 < eval(Dups add 'X') or eval(Dups add 'X') < 64) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
if (282 < eval(Dups add 'Y')) {
eval(Dups add 'IncY') = -19;
}
eval(Dups add 'X') += eval(Dups add 'IncX');
eval(Dups add 'Y') += eval(Dups add 'IncY');
eval(Dups add 'IncY') += Gravedad;
eval(Dups)._x = eval(Dups add 'X');
eval(Dups)._y = eval(Dups add 'Y');
}
}
dx = 0;
while (dx < Bolas2Max) {
++dx;
Dups = 'Bola2_' add dx;
if (eval(Dups add 'Exists') == 1) {
++CountBalls;
BallR = 30;
call('CheckCollisionAll');
if (Res == 1) {
if (eval(Dups add 'IncX') < 0) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 2) {
if (0 < eval(Dups add 'IncX')) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 3) {
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 100) {
tellTarget ('/sndExplo') {
gotoAndPlay(2);
}
if (ObjCount < 0 and ObjView == false) {
ObjCount = ObjCountInit;
}
score += 20;
eval(Dups add 'Exists') = 0;
tellTarget ('Dups') {
gotoAndPlay(2);
}
dy = 0;
count = 0;
while (dy < 8 and count < 2) {
++dy;
Dups2 = 'Bola3_' add dy;
if (eval(Dups2 add 'Exists') == 0) {
++count;
eval(Dups2 add 'X') = eval(Dups add 'X');
eval(Dups2 add 'Y') = eval(Dups add 'Y');
eval(Dups2 add 'IncX') = 5 - (count % 2) * 10;
eval(Dups2 add 'IncY') = -5;
eval(Dups2 add 'Exists') = 1;
eval(Dups2)._visible = true;
tellTarget ('Dups2') {
gotoAndStop(1);
}
}
}
}
}
}
}
if (545 < eval(Dups add 'X') or eval(Dups add 'X') < 54) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
if (292 < eval(Dups add 'Y')) {
eval(Dups add 'IncY') = -18;
}
eval(Dups add 'X') += eval(Dups add 'IncX');
eval(Dups add 'Y') += eval(Dups add 'IncY');
eval(Dups add 'IncY') += Gravedad;
eval(Dups)._x = eval(Dups add 'X');
eval(Dups)._y = eval(Dups add 'Y');
}
}
dx = 0;
while (dx < Bolas3Max) {
++dx;
Dups = 'Bola3_' add dx;
if (eval(Dups add 'Exists') == 1) {
++CountBalls;
BallR = 17.5;
call('CheckCollisionAll');
if (Res == 1) {
if (eval(Dups add 'IncX') < 0) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 2) {
if (0 < eval(Dups add 'IncX')) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 3) {
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 100) {
tellTarget ('/sndExplo') {
gotoAndPlay(2);
}
if (ObjCount < 0 and ObjView == false) {
ObjCount = ObjCountInit;
}
score += 40;
eval(Dups add 'Exists') = 0;
tellTarget ('Dups') {
gotoAndPlay(2);
}
dy = 0;
count = 0;
while (dy < 16 and count < 2) {
++dy;
Dups2 = 'Bola4_' add dy;
if (eval(Dups2 add 'Exists') == 0) {
++count;
eval(Dups2 add 'X') = eval(Dups add 'X');
eval(Dups2 add 'Y') = eval(Dups add 'Y');
eval(Dups2 add 'IncX') = 5 - (count % 2) * 10;
eval(Dups2 add 'IncY') = -5;
eval(Dups2 add 'Exists') = 1;
eval(Dups2)._visible = true;
tellTarget ('Dups2') {
gotoAndStop(1);
}
}
}
}
}
}
}
if (562 < eval(Dups add 'X') or eval(Dups add 'X') < 37) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
if (309 < eval(Dups add 'Y')) {
eval(Dups add 'IncY') = -16;
}
eval(Dups add 'X') += eval(Dups add 'IncX');
eval(Dups add 'Y') += eval(Dups add 'IncY');
eval(Dups add 'IncY') += Gravedad;
eval(Dups)._x = eval(Dups add 'X');
eval(Dups)._y = eval(Dups add 'Y');
}
}
dx = 0;
while (dx < Bolas4Max) {
++dx;
Dups = 'Bola4_' add dx;
if (eval(Dups add 'Exists') == 1) {
++CountBalls;
BallR = 7.5;
call('CheckCollisionAll');
if (Res == 1) {
if (eval(Dups add 'IncX') < 0) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 2) {
if (0 < eval(Dups add 'IncX')) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 3) {
eval(Dups add 'IncY') = -eval(Dups add 'IncY') + 1;
} else {
if (Res == 100) {
tellTarget ('/sndExplo') {
gotoAndPlay(2);
}
if (ObjCount < 0 and ObjView == false) {
ObjCount = ObjCountInit;
}
score += 80;
eval(Dups add 'Exists') = 0;
tellTarget ('Dups') {
gotoAndPlay(2);
}
}
}
}
}
if (575 < eval(Dups add 'X') or eval(Dups add 'X') < 24) {
eval(Dups add 'IncX') = -eval(Dups add 'IncX');
}
if (322 < eval(Dups add 'Y')) {
eval(Dups add 'IncY') = -12.5;
}
eval(Dups add 'X') += eval(Dups add 'IncX');
eval(Dups add 'Y') += eval(Dups add 'IncY');
eval(Dups add 'IncY') += Gravedad;
eval(Dups)._x = eval(Dups add 'X');
eval(Dups)._y = eval(Dups add 'Y');
}
}
}
frame 136 {
if (0 < TimeDisp1) {
--TimeDisp1;
}
if (0 < TimeDisp2) {
--TimeDisp2;
}
if (Disp1 == 2 and 0 >= TimeDisp1) {
tellTarget ('Disparo2-1') {
gotoAndStop(1);
}
TimeDisp1 = 0;
Disp1 = 0;
}
if (Disp2 == 2 and 0 >= TimeDisp2) {
tellTarget ('Disparo2-2') {
gotoAndStop(1);
}
TimeDisp2 = 0;
Disp2 = 0;
}
if (Disp1 == 1) {
if (Arma == 0) {
YNext = Disparo._y - 24;
XAct = Number(Disparo._x);
if (XAct < Rect01MaxX and Rect01MinX < XAct and Rect01MinY - 24 < YNext and YNext < Rect01MaxY - 24) {
tellTarget ('Disparo') {
gotoAndStop(1);
}
Disp1 = 0;
} else {
if (XAct < Rect02MaxX and Rect02MinX < XAct and Rect02MinY - 24 < YNext and YNext < Rect02MaxY - 24) {
tellTarget ('Disparo') {
gotoAndStop(1);
}
Disp1 = 0;
} else {
if (XAct < Rect03MaxX and Rect03MinX < XAct and Rect03MinY - 24 < YNext and YNext < Rect03MaxY - 24) {
tellTarget ('Disparo') {
gotoAndStop(1);
}
Disp1 = 0;
} else {
if (YNext < 40) {
tellTarget ('Disparo') {
gotoAndStop(1);
}
Disp1 = 0;
} else {
Disparo._y = YNext;
}
}
}
}
} else {
if (Arma == 1) {
YNext = Disparo2-1._y - 26.5;
XAct = Number(Disparo2-1._x);
if (XAct < Rect01MaxX and Rect01MinX < XAct and YNext < Rect01MaxY) {
tellTarget ('Disparo2-1') {
stop();
}
TimeDisp1 = TimeDisp;
Disp1 = 2;
} else {
if (XAct < Rect02MaxX and Rect02MinX < XAct and YNext < Rect02MaxY) {
tellTarget ('Disparo2-1') {
stop();
}
TimeDisp1 = TimeDisp;
Disp1 = 2;
} else {
if (XAct < Rect03MaxX and Rect03MinX < XAct and YNext < Rect03MaxY) {
tellTarget ('Disparo2-1') {
stop();
}
TimeDisp1 = TimeDisp;
Disp1 = 2;
} else {
if (YNext < 40) {
tellTarget ('Disparo2-1') {
stop();
}
TimeDisp1 = TimeDisp;
Disp1 = 2;
} else {
Disparo2-1._y = YNext;
}
}
}
}
}
}
}
if (Disp2 == 1) {
if (Arma == 0) {
YNext = Disparo2._y - 24;
XAct = Number(Disparo2._x);
if (XAct < Rect01MaxX and Rect01MinX < XAct and YNext < Rect01MaxY - 24) {
tellTarget ('Disparo2') {
gotoAndStop(1);
}
Disp2 = 0;
} else {
if (XAct < Rect02MaxX and Rect02MinX < XAct and YNext < Rect02MaxY - 24) {
tellTarget ('Disparo2') {
gotoAndStop(1);
}
Disp2 = 0;
} else {
if (XAct < Rect03MaxX and Rect03MinX < XAct and YNext < Rect03MaxY - 24) {
tellTarget ('Disparo2') {
gotoAndStop(1);
}
Disp2 = 0;
} else {
if (YNext < 40) {
tellTarget ('Disparo2') {
gotoAndStop(1);
}
Disp2 = 0;
} else {
Disparo2._y = YNext;
}
}
}
}
} else {
if (Arma == 1) {
YNext = Disparo2-2._y - 26.5;
XAct = Number(Disparo2-2._x);
if (XAct < Rect01MaxX and Rect01MinX < XAct and YNext < Rect01MaxY) {
tellTarget ('Disparo2-2') {
stop();
}
TimeDisp2 = TimeDisp;
Disp2 = 2;
} else {
if (XAct < Rect02MaxX and Rect02MinX < XAct and YNext < Rect02MaxY) {
tellTarget ('Disparo2-2') {
stop();
}
TimeDisp2 = TimeDisp;
Disp2 = 2;
} else {
if (XAct < Rect03MaxX and Rect03MinX < XAct and YNext < Rect03MaxY) {
tellTarget ('Disparo2-2') {
stop();
}
TimeDisp2 = TimeDisp;
Disp2 = 2;
} else {
if (YNext < 40) {
tellTarget ('Disparo2-2') {
stop();
}
TimeDisp2 = TimeDisp;
Disp2 = 2;
} else {
Disparo2-2._y = YNext;
}
}
}
}
}
}
}
}
frame 138 {
Res = 0;
if (0 >= TimeInmortal and Muere == 0) {
MaxX = Pang._x + 20;
MinX = Pang._x - 20;
MaxY = Pang._y + 30;
MinY = Pang._y - 30;
BallX = eval(Dups add 'X');
BallY = eval(Dups add 'Y');
call('CheckCollision');
if (0 < Res) {
Res = 200;
--Vidas;
Muere = 1;
}
}
if (Disp1 != 0 and Res == 0 and Arma == 0) {
MaxX = Disparo._x + 2;
MinX = Disparo._x - 2;
MaxY = 333;
MinY = Disparo._y;
BallX = eval(Dups add 'X');
BallY = eval(Dups add 'Y');
call('CheckCollision');
if (0 < Res) {
Res = 100;
tellTarget ('Disparo') {
gotoAndStop(1);
}
Disp1 = 0;
}
}
if (Disp2 != 0 and Res == 0 and Arma == 0) {
MaxX = Disparo2._x + 2;
MinX = Disparo2._x - 2;
MaxY = 333;
MinY = Disparo2._y;
BallX = eval(Dups add 'X');
BallY = eval(Dups add 'Y');
call('CheckCollision');
if (0 < Res) {
Res = 100;
tellTarget ('Disparo2') {
gotoAndStop(1);
}
Disp2 = 0;
}
}
if (Disp1 != 0 and Res == 0 and Arma == 1) {
MaxX = Disparo2-1._x + 2;
MinX = Disparo2-1._x - 2;
MaxY = 333;
MinY = Disparo2-1._y;
BallX = eval(Dups add 'X');
BallY = eval(Dups add 'Y');
call('CheckCollision');
if (0 < Res) {
Res = 100;
tellTarget ('Disparo2-1') {
gotoAndStop(1);
}
Disp1 = 0;
}
}
if (Disp2 != 0 and Res == 0 and Arma == 1) {
MaxX = Disparo2-2._x + 2;
MinX = Disparo2-2._x - 2;
MaxY = 333;
MinY = Disparo2-2._y;
BallX = eval(Dups add 'X');
BallY = eval(Dups add 'Y');
call('CheckCollision');
if (0 < Res) {
Res = 100;
tellTarget ('Disparo2-2') {
gotoAndStop(1);
}
Disp2 = 0;
}
}
if (Res == 0) {
MaxX = Rect01MaxX;
MinX = Rect01MinX;
MaxY = Rect01MaxY;
MinY = Rect01MinY;
BallX = eval(Dups add 'X');
BallY = eval(Dups add 'Y');
call('CheckCollision');
}
if (Res == 0) {
MaxX = Rect02MaxX;
MinX = Rect02MinX;
MaxY = Rect02MaxY;
MinY = Rect02MinY;
BallX = eval(Dups add 'X');
BallY = eval(Dups add 'Y');
call('CheckCollision');
}
if (Res == 0) {
MaxX = Rect03MaxX;
MinX = Rect03MinX;
MaxY = Rect03MaxY;
MinY = Rect03MinY;
BallX = eval(Dups add 'X');
BallY = eval(Dups add 'Y');
call('CheckCollision');
}
}
frame 139 {
BallR2 = BallR * BallR;
MaxX -= BallX;
MinX -= BallX;
MaxY -= BallY;
MinY -= BallY;
Res = 0;
if (MaxX < 0) {
if (MaxY < 0) {
if (MaxX * MaxX + MaxY * MaxY < BallR2) {
Res = 1;
}
} else {
if (0 < MinY) {
if (MaxX * MaxX + MinY * MinY < BallR2) {
Res = 1;
}
} else {
if (Math.abs(MaxX) < BallR) {
Res = 1;
}
}
}
} else {
if (0 < MinX) {
if (MaxY < 0) {
if (MinX * MinX + MaxY * MaxY < BallR2) {
Res = 2;
}
} else {
if (0 < MinY) {
if (MinX * MinX + MinY * MinY < BallR2) {
Res = 2;
}
} else {
if (Math.abs(MinX) < BallR) {
Res = 2;
}
}
}
} else {
if (MaxY < 0) {
if (Math.abs(MaxY) < BallR) {
Res = 3;
}
} else {
if (0 < MinY) {
if (MinY < BallR) {
Res = 3;
}
} else {
Res = 3;
}
}
}
}
}
frame 141 {
if (ObjCount < 0 and ObjView == false) {
ObjCount = ObjCountInit;
}
dx = 0;
while (dx < Bolas4Max) {
++dx;
Dups = 'Bola4_' add dx;
if (eval(Dups add 'Exists') == 1) {
score += 80;
eval(Dups add 'Exists') = 0;
tellTarget ('Dups') {
gotoAndPlay(2);
}
}
}
dx = 0;
while (dx < Bolas3Max) {
++dx;
Dups = 'Bola3_' add dx;
if (eval(Dups add 'Exists') == 1) {
score += 40;
eval(Dups add 'Exists') = 0;
tellTarget ('Dups') {
gotoAndPlay(2);
}
dy = 0;
count = 0;
while (dy < 16 and count < 2) {
++dy;
Dups2 = 'Bola4_' add dy;
if (eval(Dups2 add 'Exists') == 0) {
++count;
eval(Dups2 add 'X') = eval(Dups add 'X');
eval(Dups2 add 'Y') = eval(Dups add 'Y');
eval(Dups2 add 'IncX') = 5 - (count % 2) * 10;
eval(Dups2 add 'IncY') = -5;
eval(Dups2 add 'Exists') = 1;
eval(Dups2)._visible = true;
tellTarget ('Dups2') {
gotoAndStop(1);
}
}
}
}
}
dx = 0;
while (dx < Bolas2Max) {
++dx;
Dups = 'Bola2_' add dx;
if (eval(Dups add 'Exists') == 1) {
score += 20;
eval(Dups add 'Exists') = 0;
tellTarget ('Dups') {
gotoAndPlay(2);
}
dy = 0;
count = 0;
while (dy < 8 and count < 2) {
++dy;
Dups2 = 'Bola3_' add dy;
if (eval(Dups2 add 'Exists') == 0) {
++count;
eval(Dups2 add 'X') = eval(Dups add 'X');
eval(Dups2 add 'Y') = eval(Dups add 'Y');
eval(Dups2 add 'IncX') = 5 - (count % 2) * 10;
eval(Dups2 add 'IncY') = -5;
eval(Dups2 add 'Exists') = 1;
eval(Dups2)._visible = true;
tellTarget ('Dups2') {
gotoAndStop(1);
}
}
}
}
}
dx = 0;
while (dx < Bolas1Max) {
++dx;
Dups = 'Bola1_' add dx;
if (eval(Dups add 'Exists') == 1) {
score += 10;
eval(Dups add 'Exists') = 0;
tellTarget ('Dups') {
gotoAndPlay(2);
}
dy = 0;
count = 0;
while (dy < 4 and count < 2) {
++dy;
Dups2 = 'Bola2_' add dy;
if (eval(Dups2 add 'Exists') == 0) {
++count;
eval(Dups2 add 'X') = eval(Dups add 'X');
eval(Dups2 add 'Y') = eval(Dups add 'Y');
eval(Dups2 add 'IncX') = 5 - (count % 2) * 10;
eval(Dups2 add 'IncY') = -5;
eval(Dups2 add 'Exists') = 1;
eval(Dups2)._visible = true;
tellTarget ('Dups2') {
gotoAndStop(1);
}
}
}
}
}
}
frame 142 {
dx = 0;
while (dx < 2) {
++dx;
Dups = 'Bola1_' add dx;
eval(Dups)._visible = false;
}
dx = 0;
while (dx < 4) {
++dx;
Dups = 'Bola2_' add dx;
eval(Dups)._visible = false;
}
dx = 0;
while (dx < 8) {
++dx;
Dups = 'Bola3_' add dx;
eval(Dups)._visible = false;
}
dx = 0;
while (dx < 16) {
++dx;
Dups = 'Bola4_' add dx;
eval(Dups)._visible = false;
}
/Obj1._visible = false;
/Obj2._visible = false;
/Obj3._visible = false;
/Obj4._visible = false;
/Obj5._visible = false;
/Obj6._visible = false;
/Obj7._visible = false;
/Obj8._visible = false;
BolaG1._visible = false;
BolaG2._visible = false;
BolaG3._visible = false;
BolaG4._visible = false;
Pieza._visible = false;
Pieza01._visible = false;
Pieza02._visible = false;
Pieza03._visible = false;
stop();
}
button 253 {
on (release) {
stopAllSounds();
gotoAndPlay(123);
}
}
frame 230 {
dx = 0;
while (dx < 2) {
++dx;
Dups = 'Bola1_' add dx;
eval(Dups)._visible = false;
}
dx = 0;
while (dx < 4) {
++dx;
Dups = 'Bola2_' add dx;
eval(Dups)._visible = false;
}
dx = 0;
while (dx < 8) {
++dx;
Dups = 'Bola3_' add dx;
eval(Dups)._visible = false;
}
dx = 0;
while (dx < 16) {
++dx;
Dups = 'Bola4_' add dx;
eval(Dups)._visible = false;
}
/Obj1._visible = false;
/Obj2._visible = false;
/Obj3._visible = false;
/Obj4._visible = false;
/Obj5._visible = false;
/Obj6._visible = false;
/Obj7._visible = false;
/Obj8._visible = false;
BolaG1._visible = false;
BolaG2._visible = false;
BolaG3._visible = false;
BolaG4._visible = false;
Pieza._visible = false;
Pieza01._visible = false;
Pieza02._visible = false;
Pieza03._visible = false;
}
button 259 {
on (release) {
gotoAndPlay(230);
}
}
button 261 {
on (release) {
gotoAndPlay(122);
}
}
frame 231 {
stop();
}
frame 353 {
stop();
}
button 297 {
on (release) {
gotoAndPlay(1);
}
}