Ok on the homepage of my website i would like music to be automatically played as soon as the page is loaded ok. But i know how annoying that can be when you come to the site often so what i would like is for it to play automatically on the first visit and if the visitor turns it off then it wont play automatically on there next visit unless they turn it on again. Did everyone get that, My explaining may not have been too clear. Thankyou in advance xx
You need a button saying "turn off music". When a user clicks the button use javascript to set a permanant cookie to say that music is not required. Before playing music you can then check for this cookie and either play the file or not.
Im sorry im not very hot on flash can anyone point me in the direction of a tutorial or explain to me how to do this ?
Hello, geekazoid. > You need a button saying "turn off music". When a user clicks the > button use javascript to set a permanant cookie to say that music is > not required. > Before playing music you can then check for this cookie and either > play the file or not. A JavaScript cookie is the way to go if you don't want your users to be annoyed by the music. You can dispose of the button and just send them the cookie the first time they load your page. You can find an introduction to cookies here: http://www.great-web-info.com/pe580.html
I'm all for music but having sound start playing even on the first visit usually makes it my last visit. I would suggest giving visitors the option to play your music if they want to. Don't force it on them. And if your site isn't a band website I would suggest leaving the music out altogether. I hope that doesn't break your heart. If you are looking for a real sweet mp3 player then visit http://www.wimpyplayer.com/ - I have used this on a few websites and it works great. Oh and I never have the music automatically start playing. And yes it was for bands sites. Good luck.