PDA

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



thinandpale
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.

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

thinandpale
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"
ONMOUSEOVER="TRUE" AUTOSTART=TRUE LOOP=FALSE HIDDEN=TRUE>

tacmig99
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.

thinandpale
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

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

http://www.selectivemusicinc.com/bgmusic.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....