I would like to know, how can I make my website to have more than 1 background music(3). As example, when visitors visit my site, the first music will be played. But, when they click refresh, the second music will be played. When refresh is clicked again, the third music will be played.
Before this, I had came across a website with this feature. So, I would like to know how this thing is done.
It sounds like you are looking for a random sound player? If so (ie. random is ok, rather than it actually playing sound 1, sound 2, sound 3) then this code should work for you.
for (i=0; i<100; i++)
var x = Math.random()*3
else if(x<=2)var sound=sound2
else var sound=sound3
No, I mean that the background songs will keep on changing. As example, when I go to www.xyz.com, the song1.mid will be played. But, when I go to www.xyz.com again, song2 will be played.
Go to this Malaysian site, and you will understand what I mean.
Ok, I took a look at the site you pointed me to and from what it sounds like, they use some sort of random song generator, like the one I gave above... Did you try that? Each time you reload your page, it will randomly choose which of the songs you get.
I have tried out the scripts which you have given to me. Quite good. Thank you for helping me.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)