Hi, just looking for a simple answer (hopefully!) or a shove in the right direction.
I built a site for some friends who insisted on having music on the site. Not only that, but different music for each page. I used a small flash movie, with a different music clip on a loop. After much persuasion on my part, it also has an on off button. All was fine apart from the music obviously restarts for each new page and you have to go and stop it again. Is there a simple way to turn it off once and for all, across all the html pages as and when they load? Or am I going to have to come up with a new way of playing the music?
Please whatever you do, Make the off button obvious. I turn the music off every time, and it's frustrating as hell when your can't find the off button. I have been known to give up on the site and leave because I couldn't turn the music.
You do have a real problem with the page reloading every time. There is a couple of approaches you could take.
- Use cookies to remember the user's preference. Feed the cookie into the flash player via flashvars with JavaScript.
- Use a frameset (wouldn't normally recommend), where the content reloads in a different frame to that of the frame that has the flash player.
Personally I'd make it off by default. Consider the poor dialup users who are going to have to sit and wait for each file to load on every single page of the site.... my guess is that they won't.
Also, even though I'm on broadband, while at work I'd more than likely just hit the close browser button if some random music that I didn't ask for started playing through my speakers and I'm sure other users are similar.
If people want to listen to music then they'll switch it on so I'd really try and convince your friend that it's a bad idea.
Bookmarks