Play Music Once - JavaScript 2002-04-03 05:00 am If anyone has ever wanted to code a web page so that a music file (such as MIDI) is played exactly once when a visitor first arrives, but is not replayed even if the page is refreshed or left and revisited in the same session, try this:http://www.icogitate.com/~ergosum/misc/playonce.zipThe only way for the visitor to replay your music would be to close the browser, then re-open to your page. Quote Selected
Re: Play Music Once - JavaScript Reply #2 – 2003-01-16 12:49 pm oops ... my above link is obsolete. But if anyone really wants to know how it is done: Have the web page attempt to read a cookie (set previously by the same web page) as it loads. If the cookie is there, the media file is not played, and the cookie is set for the next time. Make it a temporary cookie, so that the media file will play in a future browser session.NWC: If you wish, you can remove this thread. Quote Selected