Yeah right.
This is a discussion on Website Music plays automatically on page load within the Web Design forums, part of the Web Designing & Development category; [FONT=Arial, Helvetica, sans-serif][SIZE=2]Place this code in the <head> of your html document so music starts automatically when the page loads. ...
[FONT=Arial, Helvetica, sans-serif][SIZE=2]Place this code in the <head> of your html document so music starts automatically when the page loads. Your visitor has no choice to hear it or not and there is no option to turn it off. Using the "embed" command makes your music compatible with Netscape.
[/SIZE][/FONT]Code:<embed src="yourmusic.mid"> <noembed> <bgsound src="yourmusic.mid"> </noembed>
Yeah right.
I know, I am right. Post your suggestion also.
nice, i will add that code.. what is the code if i have click something in the page and i want to still continue the music.. i have try that code once and if i click something to the page, the music will stop and start again from the top.. i hope you can help me.. thanks a lot.. =)
Need assistance in Registering business in the Philippines?
company formation philippines
(+632)856-7517
You can add your own background music to your HTML page by adding the sound embed <EMBED> tag to it. The <EMBED> tag is the most common way of adding sound to a Web page. The sound embed tag is supported by both browsers, and PC and Mac platforms. The <EMBED> tag also features an interface , including a play, stop, and handle the sound button.
To embed music and have an interface to control the music you should put the code below in your body section. To make this work you must put the soundfile "sound.wav" in the root of your web site directory.
<EMBED SRC="sound.wav" autostart="true" loop="true" HEIGHT="60" WIDTH="144"></EMBED>
To embed music without the interface you should use the following line of code.
<embed src="sound.wav" autostart="true" loop="true" hidden="true" ></embed>
There are several ways to place music, midi's, mp3 and wav files on a webpage. First you need to know the name of the music file you wish to use. Example: "sound.wav"
The html music code gives your visitor the choice if they want to hear the music or not.
<a href="sound.wav">Click here to play music </a>
Make sure you upload the music file to your server. Your visitor will need something to play the music on such as Real Player or Windows Media Player for the music to play.
Website Music plays automatically on page load. -- This is cross browser compatible. Place this code in the <head> of your html document so music starts automatically when the page loads. Your visitor has no choice to hear it or not and there is no option to turn it off. Using the "embed" command makes your music compatible with Netscape.
<embed src="sound.wav">
<noembed> <bgsound src="sound.wav"> </noembed>
To embed music on your website with a shut off button. -- You can embed music into your page so it starts automatically when someone views your page and have a small image where your visitor can turn it off.
Place the html music code where you want the button to appear on your page.
<embed src="sound.wav"
width=25 height=25 autostart=false repeat=true loop=true> </embed>
Embed music with console. -- Instead of the button, you can have a small console with on and off switches on your page such as this one below.
<embed src="sound.wav"
width="140" height="40" autostart="false" loop="FALSE">
</embed>
Music Parameters. -- To make the music play automatically the parameter is Autostart="TRUE" You can put "FALSE" instead of "TRUE" so the person visiting your page will have to click on the play button for it to start.
Bookmarks