and bounce if necessary


     else if(ball.x - ball.radius < 0)
     {
      ball.x = ball.radius;
      ball.vx *= bounce;
     }
     if(ball.y + ball.radius > stage.stageHeight)
     {
      ball.y = stage.stageHeight - ball.radius;
      ball.vy *= bounce;
     }