View Single Post
  #2  
Old 17th September 2010, 14:16
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
Before explaining the code behind this, there's a few things I must advise you of:

1) Using a large file (an mp3, for example) may take upto an hour to load on a slower (dial up) connection. This is not optimal for use as background music.
2) User a large file will also consume your bandwidth much faster than a smaller midi file.
3) Using any material that does not belong to you, or that you do not have a valid copyright for, is against the law. Regardless if you're only using it as background music on your site, copyright laws are very clear in this aspect.
4) From personal experience, if you are running a business website, that does not pertain to selling music, stay away from adding background music to your site. This may drive business away from your site, as customers do not expect music to be playing on a webpage, other than a "personal" page.

Please keep these things in mind when adding music to your site. We'd hate to see something legal happen due to your use of music on your site's pages.

If you do own the music you want to put on your site, and/or have the okay from the copyright holder, here is the code to do so:

Code:
<EMBED src="file.mid" autostart=true loop=false volume=100 
hidden=true><NOEMBED><BGSOUND src="file.mid"></NOEMBED>
Replace the file.mid (in both spots), with your file's name, and extention.

This will automatically start the file, and play it once. If you want to have it repeat, change "loop=false", to "loop=true".
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
The Following User Says Thank You to daffy For This Useful Post:
Tory (17th September 2010)