1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Website background music with Coldfusion

Discussion in 'Programming' started by lespaul00, Oct 21, 2010.

  1. #1
    Hello,

    Is there a way to add background music to a website, that does not stop or restart when you jump to another page? I think it would be cool to add background music that is uninterrupted as a user browses the website. I know how to do it for each page, but do not know how to do it for browsing an entire website.

    All of my webpages are .cfm. Is there a method to do this with the application.cfc?

    Thanks.
     
    lespaul00, Oct 21, 2010 IP
  2. agentfitz

    agentfitz Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hey there. This really has nothing to do with ColdFusion. The issue here is the stateless nature of the Web and that each request when jumping between pages will stop whatever processing was on the previous page. In order to accomplish this you could either:

    1) old school: use frames and have a frame that stays constant and plays the .mp3, while the user navigates between pages in the other frame

    2) simplest: use a pop up window to play the .mp3, this way the .mp3 is playing in a totally separate window and the user can navigate in the main window without interrupting playback, or

    3) new school: make this a completely ajax application where there are no true full new web requests (in other words, the full browser window never reloads), and instead there are just ajax requests to load content into various parts of the page. again, this way the playback of the .mp3 is never interrupted

    Unless you're already an ajax stud, I would probably recommend number 2 above as the simplest solution.

    Best,
    Brian
     
    agentfitz, Oct 28, 2010 IP
  3. cfStarlight

    cfStarlight Peon

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Brian - Great overview of the options (and I agree :)
     
    cfStarlight, Oct 28, 2010 IP
  4. lespaul00

    lespaul00 Peon

    Messages:
    283
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thank you for the insight.

    If I were to go with option #2, how would I be able to get a separate window to pop up and play the music?
     
    lespaul00, Dec 1, 2010 IP