Sign in to follow this  
Patriarch K

AudioClip doesn't work in applet?

Recommended Posts

I'm so frustated at the moment so I start this thread as well. I've got problems when I'm converting a java application to an applet. In my application my code looks like this:

URL kabooms = null;
AudioClip kaboomsSound;

and in the constructor:

try {
kabooms = new URL("file:img\\kabooms.wav");
}
catch (MalformedURLException exp) {
}
kaboomsSound = Applet.newAudioClip(kabooms);
}

kaboomsSound.play();

This works perfectly fine for me. But when I try to use it in my applet it fails big time. I get no sound however i try. Can you see something wrong with this method? Edited by Patriarch K

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this