View Single Post
Old Jan 7th, 2006, 9:27 AM   #3
JavaMan
Newbie
 
Join Date: Oct 2005
Posts: 29
Rep Power: 0 JavaMan is on a distinguished road
The AudioClip class uses Applets to load a music.

First declare your new AudioClip object:
private AudioClip sound;

Then load it:
sound = Applet.newAudioClip(this.getClass().getResource("sound.wav"));

When your mouse is within a region, just play the sound:
sound.play();
JavaMan is offline   Reply With Quote