Combined Code
frame 1 {
function dupYellow(r, c, count, left) {
duplicateMovieClip('yellow', 'brick' add r add c, count + 1);
eval('brick' add r add c)._x = left + 40 * c;
eval('brick' add r add c)._y = 50 + 20 * r;
}
function dupGreen(r, c, count, left) {
duplicateMovieClip('green', 'brick' add r add c, count + 1);
eval('brick' add r add c)._x = left + 40 * c;
eval('brick' add r add c)._y = 50 + 20 * r;
}
function dupBlue(r, c, count, left) {
duplicateMovieClip('blue', 'brick' add r add c, count + 1);
eval('brick' add r add c)._x = left + 40 * c;
eval('brick' add r add c)._y = 50 + 20 * r;
}
function dupRed(r, c, count, left) {
duplicateMovieClip('red', 'brick' add r add c, count + 1);
eval('brick' add r add c)._x = left + 40 * c;
eval('brick' add r add c)._y = 50 + 20 * r;
}
function dupWhite(r, c, count, left) {
duplicateMovieClip('white', 'brick' add r add c, count + 1);
eval('brick' add r add c)._x = left + 40 * c;
eval('brick' add r add c)._y = 50 + 20 * r;
}
function dupGold(r, c, count, left) {
duplicateMovieClip('gold', 'brick' add r add c, count + 1);
eval('brick' add r add c)._x = left + 40 * c;
eval('brick' add r add c)._y = 50 + 20 * r;
}
function dupBlack(r, c, count, left) {
duplicateMovieClip('black', 'brick' add r add c, count + 1);
eval('brick' add r add c)._x = left + 40 * c;
eval('brick' add r add c)._y = 50 + 20 * r;
}
function isInvisible() {
gold._visible = false;
red._visible = false;
blue._visible = false;
green._visible = false;
}
}
frame 1 {
paddle._visible = true;
ball._visible = true;
top._visible = false;
counter = 60;
ScreenWidth = 640;
paddleSpeed = 30;
score = 0;
speed = 6;
speedx = 8;
speedy = 8;
fscommand('fullscreen', 'true');
fscommand('trapallkeys', 'false');
stop();
}
movieClip 4 {
frame 1 {
play = 0;
stop();
}
frame 2 {
play = Number(play) + 1;
tellTarget ('/sound') {
gotoAndPlay(31);
}
/ball._visible = false;
tellTarget ('/') {
stop();
}
}
frame 8 {
if (Number(play) < 3) {
gotoAndPlay(2);
} else {
if (Number(endgame) == Number(false)) {
tellTarget ('/') {
play();
}
}
if (Number(/:endgame) == Number(false)) {
/ball._visible = true;
}
gotoAndStop(1);
}
}
}
movieClip 8 {
}
movieClip 13 {
frame 1 {
stop();
}
frame 15 {
stop();
}
}
movieClip 15 {
}
movieClip 19 {
frame 1 {
vis = 1;
stop();
}
frame 2 {
todest = /:destroy;
tellTarget ('/sound') {
gotoAndPlay(2);
}
}
frame 10 {
removeMovieClip(_parent._name add todest);
_root.score += 10;
_root.bricknumber -= 1;
if (_root.score == 1000 or _root.score == 3000 or _root.score == 5000 or _root.score == 10000 or _root.score == 20000) {
_root.balls += 1;
}
stop();
}
}
instance gold of movieClip 19 {
onClipEvent (enterFrame) {
this;
if (hitTest(_root.ball)) {
_parent.speedy *= -1;
nome = eval(this);
tellTarget ('nome add destroy') {
gotoAndPlay(2);
}
}
}
}
movieClip 23 {
frame 1 {
vis = 1;
stop();
}
frame 2 {
todest = /:destroy;
tellTarget ('/sound') {
gotoAndPlay(2);
}
}
frame 10 {
removeMovieClip(_parent._name add todest);
_root.score += 10;
_root.bricknumber -= 1;
if (_root.score == 1000 or _root.score == 3000 or _root.score == 5000 or _root.score == 10000 or _root.score == 20000) {
_root.balls += 1;
}
stop();
}
}
instance red of movieClip 23 {
onClipEvent (enterFrame) {
this;
if (hitTest(_root.ball)) {
_parent.speedy *= -1;
nome = eval(this);
tellTarget ('nome add destroy') {
gotoAndPlay(2);
}
}
}
}
movieClip 27 {
frame 1 {
vis = 1;
stop();
}
frame 2 {
todest = /:destroy;
tellTarget ('/sound') {
gotoAndPlay(2);
}
}
frame 10 {
removeMovieClip(_parent._name add todest);
_root.score += 10;
_root.bricknumber -= 1;
if (_root.score == 1000 or _root.score == 3000 or _root.score == 5000 or _root.score == 10000 or _root.score == 20000) {
_root.balls += 1;
}
stop();
}
}
instance blue of movieClip 27 {
onClipEvent (enterFrame) {
this;
if (hitTest(_root.ball)) {
_parent.speedy *= -1;
nome = eval(this);
tellTarget ('nome add destroy') {
gotoAndPlay(2);
}
}
}
}
movieClip 31 {
frame 1 {
vis = 1;
stop();
}
frame 2 {
todest = /:destroy;
tellTarget ('/sound') {
gotoAndPlay(2);
}
}
frame 10 {
removeMovieClip(_parent._name add todest);
_root.score += 10;
_root.bricknumber -= 1;
if (_root.score == 1000 or _root.score == 3000 or _root.score == 5000 or _root.score == 10000 or _root.score == 20000) {
_root.balls += 1;
}
stop();
}
}
instance green of movieClip 31 {
onClipEvent (enterFrame) {
this;
if (hitTest(_root.ball)) {
_parent.speedy *= -1;
nome = eval(this);
tellTarget ('nome add destroy') {
gotoAndPlay(2);
}
}
}
}
movieClip 35 {
frame 1 {
stop();
}
frame 3 {
gotoAndPlay(1);
}
frame 30 {
gotoAndPlay(1);
}
frame 40 {
gotoAndPlay(1);
}
}
movieClip 39 {
frame 1 {
vis = 1;
stop();
}
frame 2 {
todest = /:destroy;
tellTarget ('/sound') {
gotoAndPlay(2);
}
}
frame 10 {
removeMovieClip(_parent._name add todest);
_root.score += 10;
_root.bricknumber -= 1;
if (_root.score == 1000 or _root.score == 3000 or _root.score == 5000 or _root.score == 10000 or _root.score == 20000) {
_root.balls += 1;
}
stop();
}
}
instance black of movieClip 39 {
onClipEvent (enterFrame) {
this;
if (hitTest(_root.ball)) {
_parent.speedy *= -1;
nome = eval(this);
tellTarget ('nome add destroy') {
gotoAndPlay(2);
}
}
}
}
movieClip 43 {
frame 1 {
vis = 1;
stop();
}
frame 2 {
todest = /:destroy;
tellTarget ('/sound') {
gotoAndPlay(2);
}
}
frame 10 {
removeMovieClip(_parent._name add todest);
_root.score += 10;
_root.bricknumber -= 1;
if (_root.score == 1000 or _root.score == 3000 or _root.score == 5000 or _root.score == 10000 or _root.score == 20000) {
_root.balls += 1;
}
stop();
}
}
instance white of movieClip 43 {
onClipEvent (enterFrame) {
this;
if (hitTest(_root.ball)) {
_parent.speedy *= -1;
nome = eval(this);
tellTarget ('nome add destroy') {
gotoAndPlay(2);
}
}
}
}
movieClip 47 {
frame 1 {
vis = 1;
stop();
}
frame 2 {
todest = /:destroy;
tellTarget ('/sound') {
gotoAndPlay(2);
}
}
frame 10 {
removeMovieClip(_parent._name add todest);
_root.score += 10;
_root.bricknumber -= 1;
if (_root.score == 1000 or _root.score == 3000 or _root.score == 5000 or _root.score == 10000 or _root.score == 20000) {
_root.balls += 1;
}
stop();
}
}
instance yellow of movieClip 47 {
onClipEvent (enterFrame) {
this;
if (hitTest(_root.ball)) {
_parent.speedy *= -1;
nome = eval(this);
tellTarget ('nome add destroy') {
gotoAndPlay(2);
}
}
}
}
movieClip 60 {
}
movieClip 62 {
}
instance paddle of movieClip 62 {
onClipEvent (enterFrame) {
mx = 0;
if (Key.isDown(Key.RIGHT)) {
mx = 1;
}
if (Key.isDown(Key.LEFT)) {
mx = -1;
}
this._x += _root.paddleSpeed * mx;
if (35 >= this._x) {
this._x = 35;
}
if (_root.ScreenWidth - 35 < this._x) {
this._x = _root.ScreenWidth - 35;
}
}
}
button 71 {
on (release) {
balls = 3;
Mouse.hide();
play();
}
}
frame 2 {
ballwidth = 12;
paddlewidth = 80;
brickwidth = 40;
Level_index = 10;
bricknumber = 0;
Level_i = 1;
modified = true;
endgame = false;
top._visible = true;
border = 250;
}
frame 3 {
if (endgame) {
gotoAndPlay(5);
}
if (0 >= bricknumber) {
Level_i = Level_index - 9;
call(Level_index);
_root.isInvisible();
if (Level_index < 16) {
background.gotoAndPlay(2);
top.gotoAndPlay(2);
}
}
if (_root.ball.hitTest(_root.top)) {
speedy *= -1;
sound.gotoAndPlay(21);
}
if (_root.ball.hitTest(_root.right)) {
speedx *= -1;
sound.gotoAndPlay(21);
}
if (6 >= _root.ball._x) {
speedx *= -1;
sound.gotoAndPlay(21);
}
paddlex = paddle._x;
ballx = _root.ball._x;
if (_root.ball.hitTest(_root.paddle) and paddlex - paddlewidth / 2 - 8 < ballx and ballx < paddlex + paddlewidth / 2 + 8) {
if (ballx < paddlex - paddlewidth / 2 + int(paddlewidth / 5)) {
speedx -= 4;
} else {
if (paddlex + paddlewidth / 2 - int(paddlewidth / 5) < ballx) {
speedx += 4;
} else {
if (ballx < paddlex - paddlewidth / 2 + int(paddlewidth / 3)) {
speedx -= 3;
} else {
if (paddlex + paddlewidth / 2 - int(paddlewidth / 3) < ballx) {
speedx += 3;
}
}
}
}
speedy *= -1;
sound.gotoAndPlay(21);
}
if (_root.ball.hitTest(_root.botton)) {
if (1 < balls) {
background.gotoAndPlay(2);
}
balls -= 1;
ball._x = paddle._x;
ball._y = paddle._y - 20;
speedy *= -1;
}
/ball._x = /ball._x + speedx;
/ball._y = /ball._y + speedy;
}
frame 4 {
if (balls < 1) {
endgame = true;
gotoAndStop(6);
}
gotoAndPlay(3);
}
frame 5 {
_root.paddle._visible = false;
tellTarget ('background') {
gotoAndPlay(2);
}
tellTarget ('top') {
gotoAndPlay(2);
}
}
frame 6 {
c = 0;
r = 0;
while (r < 20) {
while (c < 20) {
removeMovieClip('brick' add r add c);
c += 1;
}
r += 1;
c = 0;
}
}
frame 7 {
Mouse.show();
stop();
}
button 83 {
on (release) {
gotoAndPlay(1);
}
}
frame 10 {
border = 240;
left = 100;
bricknumber = 50;
Level_index += 1;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
c = 0;
r = 0;
count = 1;
index = 0;
while (r < 5) {
while (c < 10 - index) {
dupGold(r, c, count, left);
c += 1;
count += 1;
}
r += 2;
index += 2;
c = index;
}
c = 1;
r = 1;
index = 0;
while (r < 5) {
while (c < 9 - index) {
dupBlue(r, c, count, left);
c += 1;
count += 1;
}
r += 2;
index += 2;
c = index + 1;
}
c = 0;
r = 7;
while (r < 9) {
while (c < 10) {
dupGreen(r, c, count, left);
c += 1;
count += 1;
}
c = 0;
r += 1;
}
_root.isInvisible();
}
frame 11 {
left = 120;
border = 150;
bricknumber = 50;
Level_index += 1;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
c = 0;
r = 0;
count = 1;
while (r < 5) {
while (c < 10) {
if (c >= r and c < 5 or c >= 5 and 9 - r >= c) {
dupGold(r, c, count, left);
} else {
dupGreen(r, c, count, left);
}
count += 1;
c += 1;
}
r += 1;
c = 0;
}
_root.isInvisible();
}
frame 12 {
left = 120;
border = 330;
bricknumber = 60;
Level_index += 1;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
c = 0;
r = 0;
count = 1;
while (r < 14) {
while (c < 10) {
if (r == 5 or r == 8) {
dupRed(r, c, count, left);
} else {
if (r == 13 or r == 0) {
dupBlue(r, c, count, left);
} else {
if (r == 7 or r == 6) {
dupGold(r, c, count, left);
}
}
}
c += 1;
count += 1;
}
r += 1;
c = 0;
}
_root.isInvisible();
}
frame 13 {
left = 120;
border = 250;
bricknumber = 72;
Level_index += 1;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
c = 0;
r = 0;
count = 1;
while (r < 10) {
while (c < 10) {
if (1 < r and r < 8 and 3 < c and c < 6 or 1 < c and c < 8 and 3 < r and r < 6) {
dupGreen(r, c, count, left);
} else {
if (r == -4 + c and 0 < r and r < 5 and 4 < c and c < 9 or r == 5 - c and 0 < r and r < 5 and 0 < c and c < 5 or 9 - r == 5 - c and 4 < r and r < 9 and 0 < c and c < 5 or 9 - r == -4 + c and 4 < r and r < 9 and 4 < c and c < 9) {
dupRed(r, c, count, left);
} else {
if (8 < r or r == 0 or c == 0 or c == 9) {
dupBlue(r, c, count, left);
}
}
}
c += 1;
count += 1;
}
r += 1;
c = 0;
}
_root.isInvisible();
}
frame 14 {
border = 370;
left = 120;
bricknumber = 116;
Level_index += 1;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
c = 0;
r = 0;
count = 1;
while (r < 16) {
while (c < 10) {
if (1 < r and r < 9 and c == 3 or 1 < r and r < 9 and c == 6) {
dupBlue(r, c, count, left);
} else {
if (1 < r and r < 9 and c == 1 or 1 < r and r < 9 and c == 8) {
dupRed(r, c, count, left);
} else {
if (r == 0 and 2 < c and c < 7 or r == 7 and 2 < c and c < 7 or r == 8 and 2 < c and c < 7) {
dupBlue(r, c, count, left);
} else {
if (r == 1) {
dupGreen(r, c, count, left);
} else {
if (8 < r) {
dupGold(r, c, count, left);
}
}
}
}
}
c += 1;
count += 1;
}
r += 1;
c = 0;
}
_root.isInvisible();
}
frame 15 {
border = 250;
bricknumber = 99;
Level_index += 1;
Left = 120;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
r = 0;
c = 0;
Count = 0;
while (10 >= r) {
while (9 >= c) {
if (r == 0 or r == 10) {
if (c == 0 or c == 8) {
dupRed(r, c, count, left);
} else {
if (c == 1 or c == 2 or c == 6 or c == 7) {
dupGold(r, c, count, left);
} else {
if (c >= 3 and 5 >= c) {
dupBlue(r, c, count, left);
}
}
}
} else {
if (r == 1 or r == 9) {
if (c == 0 or c == 1 or c == 7 or c == 8) {
dupGreen(r, c, count, left);
} else {
if (c == 2 or c == 6) {
dupBlue(r, c, count, left);
} else {
if (c >= 3 and 5 >= c) {
dupGold(r, c, count, left);
}
}
}
} else {
if (r == 2 or r == 8) {
if (c == 0 or c == 8) {
dupGreen(r, c, count, left);
} else {
if (c == 1 or c == 7) {
dupBlue(r, c, count, left);
} else {
if (c >= 2 and 6 >= c) {
dupGold(r, c, count, left);
}
}
}
} else {
if (r == 3) {
if (c == 0 or c == 8) {
dupGreen(r, c, count, left);
} else {
if (c == 1 or c == 3 or c == 5 or c == 7) {
dupBlue(r, c, count, left);
} else {
if (c == 2 or c == 4 or c == 6) {
dupGold(r, c, count, left);
}
}
}
} else {
if (r == 4 or r == 6) {
if (c == 0 or c == 8) {
dupBlue(r, c, count, left);
} else {
if (c >= 0 and 7 >= c) {
dupGold(r, c, count, left);
}
}
} else {
if (r == 5) {
if (c == 0 or c == 4 or c == 8) {
dupBlue(r, c, count, left);
} else {
if (c >= 1 and 3 >= c or c >= 5 and 7 >= c) {
dupGold(r, c, count, left);
}
}
} else {
if (r == 7) {
if (c == 0 or c == 8) {
dupGreen(r, c, count, left);
} else {
if (c == 1 or c == 7 or c >= 3 and 5 >= c) {
dupBlue(r, c, count, left);
} else {
if (c == 2 or c == 6) {
dupGold(r, c, count, left);
}
}
}
}
}
}
}
}
}
}
c += 1;
Count += 1;
}
r += 1;
c = 0;
}
_root.isInvisible();
}
frame 16 {
border = 210;
bricknumber = 81;
Level_index += 1;
Left = 120;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
c = 0;
r = 0;
count = 0;
while (8 >= r) {
while (8 >= c) {
if (r == 0 or r == 8 or c == 0 or c == 8) {
dupGreen(r, c, count, left);
} else {
if ((r == 1 or r == 7) and (c == 1 or c == 2 or c == 6 or c == 7)) {
dupGreen(r, c, count, left);
} else {
if ((r == 1 or r == 7) and (c >= 3 and 5 >= c)) {
dupYellow(r, c, count, left);
} else {
if ((r == 2 or r == 6) and (c == 1 or c == 7)) {
dupGreen(r, c, count, left);
} else {
if ((r == 2 or r == 6) and (c >= 2 and 6 >= c)) {
dupYellow(r, c, count, left);
} else {
if ((r == 3 or r == 5) and (c >= 3 and 5 >= c)) {
dupBlue(r, c, count, left);
} else {
if ((r == 3 or r == 5) and (c == 1 or c == 2 or c == 6 or c == 7)) {
dupYellow(r, c, count, left);
} else {
if (r == 4 and (c >= 3 and 5 >= c)) {
dupWhite(r, c, count, left);
} else {
if (r == 4 and (c == 1 or c == 2 or c == 6 or c == 7)) {
dupYellow(r, c, count, left);
}
}
}
}
}
}
}
}
}
c += 1;
count += 1;
}
r += 1;
c = 0;
}
_root.isInvisible();
}
frame 17 {
border = 230;
bricknumber = 90;
Level_index += 1;
Left = 120;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
r = 0;
c = 0;
count = 0;
while (9 >= r) {
while (8 >= c) {
if ((r == 0 or r == 3 or r == 6 or r == 9) and (c >= 0 and 3 >= c or c >= 5 and 8 >= c)) {
dupGold(r, c, count, left);
} else {
if ((r == 0 or r == 3 or r == 6 or r == 9) and c == 4) {
dupBlue(r, c, count, left);
} else {
if ((r == 1 or r == 2 or r == 7 or r == 8) and (c == 0 or c == 3 or c == 5 or c == 8)) {
dupGold(r, c, count, left);
} else {
if ((r == 1 or r == 2 or r == 7 or r == 8) and (c == 1 or c == 2 or c == 6 or c == 7)) {
dupRed(r, c, count, left);
} else {
if ((r == 1 or r == 2 or r == 7 or r == 8) and c == 4) {
dupBlue(r, c, count, left);
} else {
if (r == 4 or r == 5) {
dupBlue(r, c, count, left);
}
}
}
}
}
}
c += 1;
count += 1;
}
r += 1;
c = 0;
}
_root.isInvisible();
}
frame 18 {
border = 250;
bricknumber = 100;
Level_index += 1;
Left = 60;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
r = 0;
c = 0;
Count = 0;
while (10 >= r) {
while (10 >= c) {
if (r == 1 or r == 3 or r == 5 or r == 7 or r == 9) {
if (c == 1 or c == 3 or c == 5 or c == 7 or c == 9) {
dupRed(r, c, count, left);
} else {
if (c == 2 or c == 4 or c == 6 or c == 8 or c == 10) {
dupYellow(r, c, count, left);
}
}
} else {
if (r == 2 or r == 4 or r == 6 or r == 8 or r == 10) {
if (c == 2 or c == 4 or c == 6 or c == 8 or c == 10) {
dupBlack(r, c, count, left);
} else {
if (c == 1 or c == 3 or c == 5 or c == 7 or c == 9) {
dupGreen(r, c, count, left);
}
}
}
}
c += 1;
count += 1;
}
r += 1;
c = 0;
}
_root.isInvisible();
}
frame 19 {
border = 230;
bricknumber = 100;
Level_index += 1;
Left = 90;
speedx = 8;
speedy = 8;
ball._x = paddle._x;
ball._y = paddle._y - 30;
speedy *= -1;
r = 0;
c = 0;
Count = 0;
while (9 >= r) {
while (9 >= c) {
if (r == 0 or r == 1 or r == 4 or r == 5 or r == 8 or r == 9) {
if (c == 0 or c == 3 or c == 4 or c == 6 or c == 9) {
dupRed(r, c, count, left);
} else {
dupGold(r, c, count, left);
}
} else {
if (r == 2 or r == 6) {
dupBlue(r, c, count, left);
} else {
if (r == 3 or r == 7) {
dupBlack(r, c, count, left);
}
}
}
c += 1;
Count += 1;
}
r += 1;
c = 0;
}
_root.isInvisible();
}
frame 20 {
endgame = true;
Level_index = Number(Level_index) + 1;
}