开发者

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. click here to go to game directory

And here is the code to load the audioclip:

playerShot = new Audi开发者_运维知识库oClip(Galaxy.class.getClassLoader().getResource("playershot.mp3").toString());


There is an issue with short MP3 audio In JavaFX 2.0.1. A workaround is to convert it to WAV or AIFF. For viewing the issue see http://javafx-jira.kenai.com/browse/RT-13945.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜