[solved]Rectangle

I already solved on how the game start with a SPACE KEY pressed and other issues I wanted to be.

And now I want a Rectangle to be dissolved after it collided with the ball.

And I tried to use the clearRec() but It didn`t work.

Am I using the right method?