• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sound in an applet not working

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
//this code will not play the sound file.
Please could someone tell me why???
import java.applet.*;
import java.net.URL;
public class Test extends Applet
{

public void init()
{
URL codeBase = getCodeBase();
AudioClip ac = getAudioClip(codeBase,"Australia4.midi");
ac.play();
}
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic