Unofficial Tips and Tutorials for Homestead SiteBuilder™ Users


Home - Tips & Tutorials - JavaScript Demos - Java Applet Demos - Resources - Contact

Background Music Script by JK at JavaScript Kit >>>

Playing: "White Bird" originally by It's A Beautiful Day, amateur interpretation from IfniMIDI. If you do not hear it, make sure your speakers are turned on. Known to work in IE, NS, and Firefox

Although SiteBuilder comes with a sound element that you can use to play background music on your web page, some members have been having problems with it. This is an alternative to the sound element and to the standard HTML code for background sound.

Copy-and-paste from <script> to </script> into an Insert HTML element and place anywhere on your web page. Be sure you change the musicsrc tag to your full URL (in red type) where your MIDI file is located:

Notes:

On this line, document.write('<bgsound src='+'"'+musicsrc+'"'+' loop="infinite">'), if you don't want the music to loop forever (and annoy your visitors) change "infinite" to "1".

On this line, document.write('<embed src=\"'+musicsrc+'\" hidden="true" border="0" width="20" height="20" autostart="true" loop="true">'), if you, again, don't want the music to keep playing on and on, change loop="true" to loop="false".

In order for your visitors to hear the music, they must have a full install of the browser that includes a MIDI plug-in.

<script>
<!--
/*
Background music script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/

//specify FULL path to midi
var musicsrc="http://yoursite.homestead.com/files/music.mid"
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+musicsrc+'"'+' loop="infinite">')
else
document.write('<embed src=\"'+musicsrc+'\" hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
//-->
</script>

Formerly hosted at
www.geocities.com/ramblingtutor/

Home - Tips & Tutorials - JavaScript Demos - Java Demos - Resources - Contact

Webpage graphics by Arride Graphics
Copyright © 2000- Rambling Tutor and JanetS
All Rights Reserved
All other copyrights belong to their respective owners as noted.


Plus 260 visitors before joining Site Meter on June 11, 2001