java应用程序中如何调用声音文件
up 问题点数:20、回复次数:4Top
1 楼pzl686(阿虎)回复于 2002-08-02 15:43:27 得分 0
搞定就结账/Top
2 楼hexiaofeng(java爱好者)回复于 2002-08-02 15:46:44 得分 0
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.
Top
3 楼pzl686(阿虎)回复于 2002-08-13 10:56:24 得分 0
我这样调用声音文件对吗?
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();
......
}
分不够可以加分哟Top
4 楼yipinrfr(一品)回复于 2003-05-06 09:01:15 得分 20
http://expert.csdn.net/Expert/topic/918/918763.xml?temp=.9731714Top




