Hola por favor necesito hacer una modificacion en un juego clasico de una barrita que se mueve de izaquierda derecha con las flechas del teclado la cual golpea una pelotita y envia hacia arriba donde sencuentran ubicados clips de pelicula que son como ladrillos y cuando la pelotita toca un ladrillo se remueven los clips, ok la modificacion que necesito hacer es que en vez que los ladrillos se remuevan me compare cuando toca 2 ladrillos que tienen el mismo color se muestren como un acierto y va teniendo un puntaje por acertar 2 colores iguales la modificacion es como un juego de memoria cuando las fichas estan volteadas y cuando hacietras 2 iguales se voltean y te dan un puntaje en este caso necesito que la pelotita cuando toca un ladrillo volte de un color y cuando hacierte otro ladrillo de mismo color se voltean o se enciendan mas o se iluminen mas intensos lo que pueda hacer para identificar que hacerto pude ser de cualquier manera lo que no puedo lograr es modificar la funcion que en vez de remover me detecte ocompra 2 iguales y me de el acierto y un puntaje por haber acertado. ojala me hayan entendido coloco el codigo de la pelotita cuando hace el contacto y hace la funcion de remover el clip como dije lo que intento es modificar paraque me detecte 2 colores iguales y me marque el puntaje ojala haya hacido claro y me puedan ayudar de verdad es urgente aca el codigo

saludos,


onClipEvent(load) {
//random direction; 0 = left, 1= right.
dir = Math.round(Math.random() * 1);

//speed of the ball
speed =10;

if (dir == 1) {
//if going right, Ang will be 45
var Ang = 45;
} else {
//if going left, Ang will be 135
var Ang = 135;
}

//x vector for the ang, how much to move in the x coordinate
xspeed = speed * Math.cos((Ang) * Math.PI / 180);
//y vector, how much to move on the y coordinate.
yspeed = speed * Math.sin((Ang) * Math.PI / 180);
}

onClipEvent(enterFrame) {

//move the ball in the predetermined speed;
this._x += xspeed;
this._y += yspeed;

//if the ball hits either side of the stage, reverse the x direction
if ((this._x <= 5) || (this._x >= 295)) {
xspeed = -xspeed;
}

//if the ball hits the pad or the top of the stage, reverse the y direction
if ((this._y <= 5) || (_root.pad.hitTest(this))) {
yspeed = -yspeed;
removeMovieClip(this);
}

//if the player didn't catch the ball we do the same thing we did on load to reset the ball
if (this._y > 300) {

_root.lives -= 1;
if (_root.lives == 0) {
_root.play();
}

// set a new ball in the center of the stage
_x = 150;
_y = 100;

dir = Math.round(Math.random() * 1);
speed = 10;
if (dir == 1) {
var Ang = 45;
} else {
var Ang = 135;
}
xspeed = speed * Math.cos((Ang) * Math.PI / 180);
yspeed = speed * Math.sin((Ang) * Math.PI / 180);
}
}