: Hey, It's my first time trying to get an applet to play sound, and
: I'm banging my head a bit here. The sound won't play (it's a .wav)
: and What's getting me is that there's no exception thrown when run.
: If anyone can point out my error, it'd be much appreciated.
:
: thanks in advance,
: ~ Nate
:
:
: //:: Grab Songs
: // grab urls
: try {
: clipurl1 = new URL(Defines.HTTP_CONTEXT, Defines.MUSIC_URL_1);
: clipurl2 = new URL(Defines.HTTP_CONTEXT, Defines.MUSIC_URL_2);
: clipurl3 = new URL(Defines.HTTP_CONTEXT, Defines.MUSIC_URL_3);
: } catch(MalformedURLException e) {
: System.out.println("music urls invalid");
: System.exit(1);
: }
:
: // grab AudioClips
: clip1 = Applet.newAudioClip(clipurl1);
: clip1 . play();
: System.out.println("playing...");
: :
:
Are the sound clips on the same host as the applet? The default security manager of the JVM doesn't allow unsigned applets access to any other host than its own.