I'm trying to fix some very old code.
The problem is that the looping audio clip continues, even when the browser window is closed.
In other words, the browser needs to be completely shut down for the music (i.e. the applet) to stop running in the background or whatever. I need a way to, at the very least, stop the sound from playing when the window containing the applet is closed. Even better: close the applet completely when closing the containing window (is this possible?).
Here's how the code basically works:
AudioClip music; music=getAudioClip(getDocumentBase(),"file.mid"); music.loop();
Any ideas? I figure this should be fairly straightforward to do. I just don't know how to approach it.
Again, essentially, I need a "music.stop();" command to be issued on window close, at the very least.