Hit Test

Modify the movie by adding code for hitting and missing the paddle.

var numHits:int=0;
function hitPaddle(): void {
   numHits++;
   lblHits.text=numHits.toString();
}
function missPaddle(): void {
   numHits--;
   if(numHits<0) numHits=0;
   else lblHits.text=numHits.toString();
}
Get Adobe Flash player
Download the movie.

NEXT: Modify FallingStar to hit and miss