• 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();
}
}
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!