This is the right way to implement an applet that plays a sound loop. Note that, unlike the other version, the sound being played terminates immediately upon your exit from this page.

This applet accepts as a parameter the name of a sound file and plays the file over and over again until you leave the page. Ambience or torture? You decide. :-)

The source