class Applet----static AudioClip newAudioClip(URL url)
Get an audio clip from the given URL.
void play(URL url)
Plays the audio clip at the specified absolute URL.
void play(URL url, String name)
Plays the audio clip given the URL and a specifier that is relative to it.
Get an audio clip from the given URL.
void play(URL url)
Plays the audio clip at the specified absolute URL.
void play(URL url, String name)
Plays the audio clip given the URL and a specifier that is relative to it.
publci class A //我的主程序
{
......
Applet applet=new Applet();
//soundFile创建的文件,存放声音文件
java.net.URL url=soundFile.toURL();
//Auth1.Au声音文件
AudioClip audioClip=applet.getAudioClip(url,"Auth1.au");
audioClip.play();
......
}
分不够可以加分哟