Simple Java Sound Applet won't work!!! ARG!!!
Posted
by William
on Stack Overflow
See other posts from Stack Overflow
or by William
Published on 2009-09-09T12:33:23Z
Indexed on
2010/04/01
11:03 UTC
Read the original article
Hit count: 185
import java.applet.*;
/**
* SoundApplet.java - a simple applet that plays the "gong.au" sound file.
*/
public class AppletGame extends Applet
{
public void init()
{
super.init();
resize(0,0);
AudioClip gong = getAudioClip(getDocumentBase(), "test0.au");
gong.play();
}
}
In Eclipse applet viewer it loads and doesn't play sound. In html it doesn't load and says start not initalized. I've tried calling it outside of init, and all that someone help me!!!
© Stack Overflow or respective owner