Sign in to follow this  

AudioClip doesn't work in applet?

This topic is 1848 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

This topic is 1848 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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