|
-
August 13th, 2001, 11:24 AM
#3
Re: Playing Sound from Applet
Thank you for your anwser i know that for playing sound i can use AudioClip class but i don't know how. i write this prog. but it didn't work.
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*
<applet code="MySound" width=200 height=200>
</applet>
*/
public class MySound extends Applet {
AudioClip audioClip;
public void init()
audioClip = Applet.getAudioClip(getCodeBase(),"gradually.wav");
audioClip.play();
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|