Forum Stats

  • 3,839,096 Users
  • 2,262,451 Discussions


JavaFX 2.0 AudioClip doesn't play in applets?

Okay,so I made a small game in JavaFX 2.0, and I have a player shot sound which plays each time the player shoots. Works great on desktop, but doesn't play on applet.

I was wondering if anyone could tell me why the shot sound doesn't play in the applet?

Here is the directory with the game. galaxy.html is used to play the applet.

And here is the code to load the audioclip:

playerShot = new AudioClip(Galaxy.class.getClassLoader().getResource("playershot.mp3").toString());
This discussion has been closed.