• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

sound

 
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
I am trying to play a sound when the user clicks a button in my applet. I am using the following method:
AudioClip myAudio = getAudioClip(getCodeBase(), "chord.wav");
myAudio.play();
I don't get any errors or warnings, but no sound is played.
The button works properly (I tested it by printing text to a TextArea on my applet whenever the button was pressed).
Any ideas?
Thanks in advance.
Stephanie
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Grasson!
Why don't u give in a little bit code what u are trying to work on. so that it would be easy to understand what exactly is the problem.(Of course if u still persist with the problem.
Tks.
Kumaresan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!