The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

HTML help

plantersplanters Registered User regular
edited July 2007 in Help / Advice Forum
How would you embed a background sound in a way that when you go to a different page it doesn't replay, and just continue?

planters on

Posts

  • drinkinstoutdrinkinstout Registered User regular
    edited July 2007
    you'd likely have to use frames or iframes so that the sound only exists in the parent frame and the navigation takes place inside of it. Might not be feasable depending on the site and what it's used for.

    drinkinstout on
  • plantersplanters Registered User regular
    edited July 2007
    It's a simple design, just pages with a navigation bar, there's a background sound but when you go to a different page the sound starts over and it gets annoying after a while, so the only way would be iframes?

    planters on
  • LewishamLewisham Registered User regular
    edited July 2007
    planters wrote: »
    It's a simple design, just pages with a navigation bar, there's a background sound but when you go to a different page the sound starts over and it gets annoying after a while, so the only way would be iframes?

    That's the simplest way. HTML has no concept of state. The only other way would be a cookie, or passing a parameter each time through the site and having a dynamically generated page.

    To be honest, I'd rather you evaluated whether you need the sound file to automatically play or not. Most users find it really obnoxious.

    Lewisham on
  • drinkinstoutdrinkinstout Registered User regular
    edited July 2007
    yeah, frames are the only way I can think of doing it aside from making it a Flash site. But like Lewis mentions above, sounds on webpages are usually frowned upon unless the site is designed for it.

    If you really want music to play, you might want to allow the user to stop the music and possibly store that in a cookie so when they revisit, their choice is saved...

    drinkinstout on
  • plantersplanters Registered User regular
    edited July 2007
    Well, the music goes well with the site (it's an event planning site), and it's classical music. How would I go about making start and stop buttons for the music, cause right now it autoplays and there's the pause button from WMP.

    planters on
  • drinkinstoutdrinkinstout Registered User regular
    edited July 2007
    planters wrote: »
    Well, the music goes well with the site (it's an event planning site), and it's classical music. How would I go about making start and stop buttons for the music, cause right now it autoplays and there's the pause button from WMP.

    I'm not sure about actually controlling the music and starting and stopping it - I meant it would be nice to allow users to have a setting for themselves that disabled the music from playing. Giving the visitors control over this type of thing is usually greatly appreciated - much like skipping splash pages, saving your language or location, etc. I don't know if you've played with cookies but I'm sure you might even be able to find a tutorial that does something very similar to this: If no cookie exists then add music-playing code to the page, If one exists and the setting says not to play it, don't add the code. It's been ages since I've played with cookies so I don't have any code examples on hand

    drinkinstout on
Sign In or Register to comment.