View Full Version : How do I make random mp3 files play when page refreshes ?

08-22-2006, 12:33 PM
I have a much better understanding how it should work, but I can't seem to figure it out.

the random text works great, but what about embeded mp3 files ? How do I get an mp3 at random to play upon page refresh. Just one mp3 per refresh.

08-22-2006, 12:36 PM
Just print the entire embed tag like the quotes.

08-23-2006, 01:55 AM
This is a sample embed from my web site. I can't get it to work in the script as a random sound.

Can you show me how the tag should be slipped in. I've been trying and I can't figure it out.

<EMBED SRC="http://www.selectivemusicinc.com/sound/machine01.wav"

08-23-2006, 02:04 AM
I believe the rest of the true and false statements should have quotations around them aswell. And I'm not sure what you're trying to do with the mouseover statement.
Btw this isn't Javascript, unless you were asking for the javascript code to make the page refresh aswell.

08-23-2006, 02:07 AM
I just figured it out....

I needed to put \ infront of " in the embed so it could read it

08-23-2006, 02:10 AM
The originaly script I was trying to make work was .js


and I thought I had to make this list and use js to get it and make it play.

I never figured that out. Someone told me I would have to use php and I got confused.

But this works....