Closed Thread Icon

Topic awaiting preservation: Stop/Start MIDI Playback (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8789" title="Pages that link to Topic awaiting preservation: Stop/Start MIDI Playback (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Stop/Start MIDI Playback <span class="small">(Page 1 of 1)</span>\

 
Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 07-30-2003 11:33

OK, so I'm redesigning a client's site, which currently has MIDI files playing on every page. (Theme songs from Dallas, Hogan's Heroes, etc. which have nothing to do with what he's selling.) I've tried my damnedest to convince him people hate that stuff, but he won't hear it. He insists people love it. But he's paying for the site, so what can you do?

However, I'm going to try to convince him to allow me to incorporate play and stop buttons into the design. (I want to be able to use my own images as the play and stop buttons.) It should automatically play on the first page they visit, but if they hit stop, it won't play again on any subsequent page until they hit play again. (Cookies, I assume?)

I've done a little looking around, but I'm not really coming up with anything that looks very good. I certainly don't want to embed a QT control panel or anything that must be installed. Is it possible to control this with JS?

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 07-30-2003 12:34

If you're using a <bgsound> tag to embed the sound in the page, you can add an ID attribute to it and use JavaScript to start and stop the sound. This won't work anywhere but in IE, but I suppose that's OK in your case

code:
//start
document.all.replaceThisWithTheID.src = "dallas_theme.mid";

//stop
document.all.replaceThisWithTheID.src = "";



Then you can use the cookie functions from this :FAQ: to set a cookie when the stop button is clicked and check if the cookie is set onload.

Hope this helps you getting started.

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 08-07-2003 03:30

Sounds simple enough. And looking at their old site, they do indeed use <bgsound> to embed the MIDI file, so I'll use the same.

Hopefully they'll let me add those buttons!

Thanks a bunch.


« BackwardsOnwards »

Show Forum Drop Down Menu