title: JavaFX: Play a sound when ever something is clicked
body: <p>I currently have my EventHandler here:</p>
  
  <pre><code>theScene.setOnMouseClicked(
              new EventHandler&lt;MouseEvent&gt;() {
                  public void handle(MouseEvent e) {
                      if (targetData.containsPoint(e.getX(), e.getY())) {
                          double x = 50 + 400 * Math.random();
                          double y = 50 + 400 * Math.random();
                          targetData.setCenter(x, y);
                          mediaPlayer.play(); //play hitsound
                          points.value++; //add points
                      } else {
                          points.value = 0; //miss
                      }
                  }
              });
  </code></pre>
  
  <p>I also have my audio setup like so:</p>
  
  <pre><code>    String hitNormal = ("hit.mp3");
      Media sound = new Media(new File(hitNormal).toURI().toString());
      MediaPlayer mediaPlayer = new MediaPlayer(sound);
  </code></pre>
  
  <p>When I run my program, only the first click on the circle plays the hitsound, but all the following circles do not play the sound. I think what I have above should work since every time I click additional circles it always adds score. Since I have my mediaPlayer.play(); in the exact same if statement as the line that adds score, I expected the sound to play as well. How do I get my hitsound to play every time I click the circle?</p>
  
  <p>EDIT: I added mediaPlayer.stop(); under points.value++ and it seems to occasionally play the hitsound but not always.</p>