Frame 1
loadVariables ("getHighScore.php?optimize=1", _root);
Frame 2
ifFrameLoaded (100) {
gotoAndPlay (4);
}
Frame 3
gotoAndPlay (2);
Frame 4
stop();
Frame 8
fps = 24;
checkDist = int(350 / fps);
maxBallDx = int(320 / fps);
maxBallDy = int(320 / fps);
tempoTotal = 0;
barSpeed = 0;
areaBlockX = 175;
areaBlockY = 60;
areaBlockWidth = 280;
areaBlockHeight = 180;
dimListX = new Array();
dimListX.push(4, 4, 6, 6, 8, 8, 10, 10, 12);
dimListY = new Array();
dimListY.push(2, 2, 3, 3, 4, 4, 5, 5, 6);
barSizeList = new Array();
barSizeList.push(60, 55, 55, 50, 50, 45, 45, 40, 37);
imageFrame = 1;
imagem.gotoAndStop(imageFrame);
reservas = 2;
bolareserva1._y = 380;
bolareserva2._y = 380;
barreira1DxList = new Array();
barreira1DxList.push(0, 0, 0, 0, 2, 2, 2, 2, 2);
barreira2DxList = new Array();
barreira2DxList.push(0, 0, 0, 0, 0, 0, 0, 2, 2);
barreira1._x = -100;
barreira2._x = -100;
durosList = new Array();
durosList.push(0, 0, 0, 0, 0, 1, 1, 1, 1);
efeito = true;
Frame 9
x = 1;
while (12 >= x) {
y = 1;
while (6 >= y) {
removeMovieClip((("bloco" add x) add "_") add y);
y++;
}
x++;
}
Frame 10
stop();
Frame 11
function startBall() {
ballDx = int((random(150) - 75) / fps);
ballDy = int((-(150 + (imageFrame * 6))) / fps);
bola._x = 305 - (bola._width / 2);
bola._y = 360;
}
if (dimList.length == 0) {
gotoAndPlay (56);
} else {
startBall();
barra._width = barSizeList.shift();
vDimX = dimListX.shift();
vDimY = dimListY.shift();
numBlockCols = vDimX;
numBlockLines = vDimY;
numBlocks = numBlockCols * numBlockLines;
BlockWidth = areaBlockWidth / numBlockCols;
BlockHeight = areaBlockHeight / numBlockLines;
n = 1;
useDuro = durosList.shift();
canHit = numBlocks;
y = 1;
}
Frame 12
if (numBlockLines >= y) {
x = 1;
} else {
imagem.gotoAndStop(imageFrame);
vAux = Barreira1DxList.shift();
if (0 < vAux) {
if (barreira1._x == -100) {
barreira1._x = 145;
barreira1Dx = vAux;
} else if (0 < barreira1Dx) {
barreira1Dx = barreira1Dx + vAux;
} else {
barreira1Dx = barreira1Dx - vAux;
}
} else {
barreira1Dx = 0;
}
vAux = Barreira2DxList.shift();
if (0 < vAux) {
if (barreira2._x == -100) {
barreira2._x = 145;
barreira2Dx = vAux;
} else if (0 < barreira2Dx) {
barreira2Dx = barreira2Dx + vAux;
} else {
barreira2Dx = barreira2Dx - vAux;
}
} else {
barreira2Dx = 0;
}
gotoAndPlay (16);
}
Frame 13
if (numBlockCols >= x) {
if ((useDuro == 1) and (y == 1)) {
vFonte = "duro";
vHits = 2;
} else {
vFonte = "bloco";
vHits = 1;
}
duplicateMovieClip (vFonte, (("bloco" add x) add "_") add y, n + 100);
vAux = eval ((("bloco" add x) add "_") add y);
vAux._x = (areaBlockX + ((x - 1) * BlockWidth)) + 1;
vAux._y = (areaBlockY + ((y - 1) * BlockHeight)) + 1;
vAux._width = BlockWidth - 2;
vAux._height = BlockHeight - 2;
vAux.coordX = x;
vAux.coordY = y;
vAux.isVisible = true;
vAux.Hits = vHits;
n = n + 1;
x++;
} else {
y++;
gotoAndPlay (12);
}
Frame 14
gotoAndPlay (13);
Frame 28
inicioDaFase = getTimer();
Frame 29
function checkBlock(parBlockName, parOldX, parOldY, parNewX, parNewY, parRedirect) {
if (parOldX < parNewX) {
if (Math.abs((parOldX - getProperty(parBlockName, _x)) + getProperty("bola", _width)) < checkDist) {
if (checkLeft(parBlockName, parOldX, parOldY, parNewX, parNewY, parRedirect)) {
return(true);
}
}
} else if (Math.abs((parOldX - getProperty(parBlockName, _x)) - getProperty(parBlockName, _width)) < checkDist) {
if (checkRight(parBlockName, parOldX, parOldY, parNewX, parNewY, parRedirect)) {
return(true);
}
}
if (parOldY < parNewY) {
if (Math.abs((parOldY - getProperty(parBlockName, _y)) + getProperty("bola", _height)) < checkDist) {
if (checkTop(parBlockName, parOldX, parOldY, parNewX, parNewY, parRedirect)) {
return(true);
}
}
} else if (Math.abs((parOldY - getProperty(parBlockName, _y)) - getProperty(parBlockName, _height)) < checkDist) {
if (checkBottom(parBlockName, parOldX, parOldY, parNewX, parNewY, parRedirect)) {
return(true);
}
}
return(false);
}
function checkLeft(parBlockName, parOldX, parOldY, parNewX, parNewY, parRedirect) {
blockX = getProperty(parBlockName, _x);
blockStartY = getProperty(parBlockName, _y) - (getProperty("bola", _height) / 2);
blockEndY = (getProperty(parBlockName, _y) + getProperty(parBlockName, _height)) + (getProperty("bola", _height) / 2);
ballOldX = parOldX + getProperty("bola", _width);
ballOldY = parOldY + (getProperty("bola", _height) / 2);
ballNewX = parNewX + getProperty("bola", _width);
ballNewY = parNewY + (getProperty("bola", _height) / 2);
if ((blockX >= ballOldX) and (ballNewX >= blockX)) {
intersectY = ballOldY + (((blockX - ballOldX) / (ballNewX - ballOldX)) * (ballNewY - ballOldY));
if ((intersectY >= blockStartY) and (blockEndY >= intersectY)) {
newBallPosX = newBallPosX - ((ballNewX - blockX) * 2);
BallDx = -BallDx;
return(true);
}
}
return(false);
}
function checkRight(parBlockName, parOldX, parOldY, parNewX, parNewY, parRedirect) {
blockX = getProperty(parBlockName, _x) + getProperty(parBlockName, _width);
blockStartY = getProperty(parBlockName, _y) - (getProperty("bola", _height) / 2);
blockEndY = (getProperty(parBlockName, _y) + getProperty(parBlockName, _height)) + (getProperty("bola", _height) / 2);
ballOldX = parOldX;
ballOldY = parOldY + (getProperty("bola", _height) / 2);
ballNewX = parNewX;
ballNewY = parNewY + (getProperty("bola", _height) / 2);
if ((ballOldX >= blockX) and (blockX >= ballNewX)) {
intersectY = ballOldY + (((blockX - ballOldX) / (ballNewX - ballOldX)) * (ballNewY - ballOldY));
if ((intersectY >= blockStartY) and (blockEndY >= intersectY)) {
newBallPosX = newBallPosX - ((ballNewX - blockX) * 2);
BallDx = -BallDx;
return(true);
}
}
return(false);
}
function checkTop(parBlockName, parOldX, parOldY, parNewX, parNewY, parRedirect) {
blockY = getProperty(parBlockName, _y);
blockStartX = getProperty(parBlockName, _x) - (getProperty("bola", _width) / 2);
blockEndX = (getProperty(parBlockName, _x) + getProperty(parBlockName, _width)) + (getProperty("bola", _width) / 2);
ballOldX = parOldX + (getProperty("bola", _width) / 2);
ballOldY = parOldY + getProperty("bola", _height);
ballNewX = parNewX + (getProperty("bola", _width) / 2);
ballNewY = parNewY + getProperty("bola", _height);
if ((blockY >= ballOldY) and (ballNewY >= blockY)) {
intersectX = ballOldX + (((blockY - ballOldY) / (ballNewY - ballOldY)) * (ballNewX - ballOldX));
if ((intersectX >= blockStartX) and (blockEndX >= intersectX)) {
if (!parRedirect) {
newBallPosY = newBallPosY - ((ballNewY - blockY) * 2);
BallDy = -BallDy;
} else {
newBallPosY = newBallPosY - ((ballNewY - blockY) * 2);
ballDy = (-BallDy) * 1.05;
if (efeito) {
ballDx = ballDx - barSpeed;
} else {
indice = (((blockEndX + blockStartX) / 2) - intersectX) / ((blockEndX - blockStartX) / 2);
if (0 < indice) {
indice = indice * indice;
} else {
indice = -(indice * indice);
}
ballDx = ballDx - (indice * 8);
}
if (maxBallDy < ballDy) {
ballDy = maxBallDy;
} else if (ballDy < (-maxBallDy)) {
ballDy = -maxBallDy;
}
if (maxBallDx < ballDx) {
ballDx = maxBallDx;
} else if (ballDx < (-maxBallDx)) {
ballDx = -maxBallDx;
}
}
return(true);
}
}
return(false);
}
function checkBottom(parBlockName, parOldX, parOldY, parNewX, parNewY, parRedirect) {
blockY = getProperty(parBlockName, _y) + getProperty(parBlockName, _height);
blockStartX = getProperty(parBlockName, _x) - (getProperty("bola", _width) / 2);
blockEndX = (getProperty(parBlockName, _x) + getProperty(parBlockName, _width)) + (getProperty("bola", _width) / 2);
ballOldX = parOldX + (getProperty("bola", _width) / 2);
ballOldY = parOldY;
ballNewX = parNewX + (getProperty("bola", _width) / 2);
ballNewY = parNewY;
if ((ballOldY >= blockY) and (blockY >= ballNewY)) {
intersectX = ballOldX + (((blockY - ballOldY) / (ballNewY - ballOldY)) * (ballNewX - ballOldX));
if ((intersectX >= blockStartX) and (blockEndX >= intersectX)) {
newBallPosY = newBallPosY - ((ballNewY - blockY) * 2);
BallDy = -BallDy;
return(true);
}
}
return(false);
}
tempoDaFase = int((getTimer() - inicioDaFase) / 1000);
tempoTotalAtual = tempoTotal + tempoDaFase;
BallPosX = getProperty("bola", _x);
BallPosY = getProperty("bola", _y);
newBallPosX = BallPosX + BallDx;
newBallPosY = BallPosY + BallDy;
if (checkBlock("barra", BallPosX, BallPosY, newBallPosX, newBallPosY, true)) {
barra.gotoAndPlay(2);
}
i = 0;
vCont = true;
while (vCont) {
StartCoordX = int((newBallPosX - areaBlockX) / BlockWidth);
StartCoordY = int((newBallPosY - areaBlockY) / BlockHeight);
vCont = false;
CoordX = StartCoordX;
while ((StartCoordX + 2) >= CoordX) {
CoordY = StartCoordY;
while ((StartCoordY + 2) >= CoordY) {
if ((((0 < CoordX) and (0 < CoordY)) and (numBlockCols >= CoordX)) and (numBlockLines >= CoordY)) {
vAux = eval ((("bloco" add CoordX) add "_") add CoordY);
if (vAux.isVisible) {
if (checkBlock((("bloco" add CoordX) add "_") add CoordY, BallPosX, BallPosY, newBallPosX, newBallPosY, false)) {
vAux.gotoAndPlay(2);
vAux.Hits--;
if (vAux.Hits == 0) {
vAux._x = -1000;
vAux._y = -1000;
vAux.isVisible = false;
vAux.canHit = false;
canHit--;
}
vCont = true;
}
}
}
CoordY++;
}
CoordX++;
}
}
if (barreira1Dx != 0) {
if (checkBlock("barreira1", BallPosX, BallPosY, newBallPosX, newBallPosY, false)) {
barreira1.gotoAndPlay(2);
}
if (barreira2Dx != 0) {
if (checkBlock("barreira2", BallPosX, BallPosY, newBallPosX, newBallPosY, false)) {
barreira2.gotoAndPlay(2);
}
}
}
if (checkBlock("parede1", BallPosX, BallPosY, newBallPosX, newBallPosY, false)) {
parede1.gotoAndPlay(2);
}
if (checkBlock("parede2", BallPosX, BallPosY, newBallPosX, newBallPosY, false)) {
parede2.gotoAndPlay(2);
}
if (checkBlock("parede3", BallPosX, BallPosY, newBallPosX, newBallPosY, false)) {
parede3.gotoAndPlay(2);
}
bola._X = newBallPosX;
bola._Y = newBallPosY;
Frame 30
function moveMouse() {
vX = _root._xmouse - (barra._width / 2);
if (vX < (parede1._x + parede1._width)) {
vX = parede1._x + parede1._width;
} else if (parede2._x < (vX + barra._width)) {
vX = parede2._x - barra._width;
}
barSpeed = ((barSpeed * 3) / 4) + (((vX - barra._X) * 1) / 4);
barra._x = vX;
}
function moveBarreira(parNum) {
vAux = eval ("barreira" add parNum);
vDx = eval (("barreira" add parNum) add "Dx");
vAux._x = vAux._x + vDx;
if (0 < vDx) {
if ((vAux._x + vAux._width) >= parede2._x) {
vAux._x = parede2._x - vAux._width;
vDx = -vDx;
}
} else if ((parede1._x + parede1._width) >= vAux._x) {
vAux._x = parede1._x + parede1._width;
vDx = -vDx;
}
Set(("barreira" add parNum) add "Dx", vDx);
}
moveMouse();
if (barreira1Dx != 0) {
moveBarreira(1);
if (barreira2Dx != 0) {
moveBarreira(2);
}
}
if (400 < bola._y) {
gotoAndPlay (44);
} else if (0 >= canHit) {
gotoAndPlay (34);
} else {
gotoAndPlay (29);
}
Frame 34
imageFrame++;
imagem.gotoAndStop(imageFrame);
if (dimListX.length == 0) {
gotoAndPlay (56);
}
Frame 36
moveMouse();
Frame 37
gotoAndPlay (36);
Frame 44
count = 0;
Frame 45
moveMouse();
count++;
if ((fps * 3) < count) {
if (reservas == 0) {
gotoAndPlay (54);
} else {
vAux = eval ("bolareserva" add reservas);
vAux._y = -1000;
reservas--;
startBall();
gotoAndPlay (29);
}
}
Frame 46
gotoAndPlay (45);
Frame 54
tempoTotal = tempoTotalAtual;
selection.setFocus("new_nome");
if (promo == "1") {
promocao._x = 307;
} else {
promocao._x = -123;
}
stop();
Frame 56
tempoTotal = tempoTotalAtual;
selection.setFocus("new_nome");
if (promo == "1") {
promocao._x = 307;
} else {
promocao._x = -123;
}
stop();
Frame 80
gotoAndPlay (8);
Symbol 33 Button
on (release) {
_root.gotoAndPlay("Init");
}
Symbol 34 Button
on (release) {
getURL ("http://www.vapra.com.br", "_self");
}
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 2
stop();
Symbol 62 MovieClip Frame 3
stop();
Symbol 62 MovieClip Frame 4
stop();
Symbol 62 MovieClip Frame 5
stop();
Symbol 62 MovieClip Frame 6
stop();
Symbol 62 MovieClip Frame 7
stop();
Symbol 62 MovieClip Frame 8
stop();
Symbol 62 MovieClip Frame 9
stop();
Symbol 62 MovieClip Frame 10
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 2
gotoAndPlay (1);
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
gotoAndPlay (1);
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 2
gotoAndPlay (1);
Symbol 77 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 2
gotoAndPlay (1);
Symbol 78 MovieClip Frame 1
stop();
Symbol 78 MovieClip Frame 2
gotoAndPlay (1);
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 2
gotoAndPlay (1);
Symbol 129 MovieClip Frame 1
cont = 0;
loadVariables ("getHighScore.php", _root);
Symbol 129 MovieClip Frame 2
cont++;
if ((_root.fps * 5) < cont) {
gotoAndPlay (1);
}
Symbol 129 MovieClip Frame 3
gotoAndPlay (2);
Symbol 134 Button
on (release) {
getURL ("http://www.vapra.com.br", "_blank");
}
Symbol 137 MovieClip Frame 1
stop();
Symbol 137 MovieClip Frame 2
gotoAndPlay (1);
Symbol 146 Button
on (release) {
loadVariables ("voto.php?anime=arkanoid&voto=1", _root);
gotoAndPlay (11);
}
Symbol 151 Button
on (release) {
tempoTotal = tempoTotalAtual;
gotoAndPlay (11);
}
Symbol 156 Button
on (release) {
gotoAndPlay (8);
}
Symbol 161 Button
on (release, keyPress "<Enter>") {
new_nivel = imageFrame;
if (9 < new_nivel) {
new_nivel = 9;
}
new_blocos = canHit;
new_tempo = tempoTotalAtual;
vUrl = (((((("setHighScore.php?new_nivel=" add new_nivel) add "&new_blocos=") add new_blocos) add "&new_tempo=") add new_tempo) add "&new_nome=") add escape(new_nome);
loadVariables (vUrl, _root);
gotoAndPlay (58);
}