Agent_of_Knowledge Posted November 18, 2003 Share Posted November 18, 2003 I haven't coded in html for years and apparentlly I need to re-learn everything. I just wanted to know the code that needs to be implemented, to get a background .wav playing automatically once the user reaches that desired page. Anyone have an idea? Thanks. Cheers! Link to comment Share on other sites More sharing options...
0 Adrian Posted November 18, 2003 Share Posted November 18, 2003 you would want to do something like this <bgsound src="THE SOURCE" loop="-1"> NB: Where it says the source in capitals, thats you need to change that to where the music file is located. Also where it says loop="-1" that means that it will keep repeating, but if u want it to play only once you need to put loop="1" and for two times you will need to put loop="2" and so on.... Link to comment Share on other sites More sharing options...
0 sys32 Posted November 18, 2003 Share Posted November 18, 2003 :laugh: Please, for everyones sake, don't use background music on your website! Please! Link to comment Share on other sites More sharing options...
0 Spyder Veteran Posted November 18, 2003 Veteran Share Posted November 18, 2003 or at least have the ability to turn it off if a user wishes :) Link to comment Share on other sites More sharing options...
0 best_uv_d_best Posted November 18, 2003 Share Posted November 18, 2003 :laugh: Please, for everyones sake, don't use background music on your website! Please!neopwi amen to that, brothuh... :no: :pinch:EDIT: GAH D4MNIT!!! freakin neopwi... and i can't take it out w/ edit, either!!! :angry: Link to comment Share on other sites More sharing options...
0 Adrian Posted November 18, 2003 Share Posted November 18, 2003 ok, if u want it so a user can stop the music, you would do something like this <script> function stop() { music.src=""; } </script> <bgsound id="music" src="Adema-Freaking Out.mp3" loop="-1"> <div onClick="stop()" >Click Here to stop</div> OR <script> function stop() { music.src=""; } </script> <bgsound id="music" src="Adema-Freaking Out.mp3" loop="-1"> <a onClick="stop()" >Click Here to stop</a> and if u want to do it wiv a button <script> function stop() { music.src=""; } </script> Click Here to stop</div> <bgsound id="music" src="Adema-Freaking Out.mp3" loop="-1"> <a onClick="stop()" >Click Here to stop</a> Just remember to change the song location... EDIT: 100th post :laugh: :ninja: Link to comment Share on other sites More sharing options...
0 N_B Posted November 18, 2003 Share Posted November 18, 2003 What system32 said. Background music on sites is horrible. Disturbes the music I'm playing that I actually WANT to listen to.. Link to comment Share on other sites More sharing options...
0 Adrian Posted November 18, 2003 Share Posted November 18, 2003 What system32 said.Background music on sites is horrible. Disturbes the music I'm playing that I actually WANT to listen to.. neopwi who knows? he might be doing it for a local intranet :ninja: Link to comment Share on other sites More sharing options...
0 N_B Posted November 18, 2003 Share Posted November 18, 2003 What's with the "neopwi"'s? :huh: Link to comment Share on other sites More sharing options...
0 trix Posted November 18, 2003 Share Posted November 18, 2003 what N_B said i been seein em all day! Link to comment Share on other sites More sharing options...
0 Adrian Posted November 18, 2003 Share Posted November 18, 2003 what N_B said i been seein em all day!neopwi there was a post about it in SFI, but it has been closed and an admin has been notified :ninja: Link to comment Share on other sites More sharing options...
0 dpanda Posted January 10, 2004 Share Posted January 10, 2004 <script> function stop() { music.src=""; } </script> <bgsound id="music" src="music/infernal affairs ost.mp3" loop="-1"> <a onClick="stop()" >Click Here to stop</a> i added this in my html. it show up but the music was not played. it was played when i use dreamweaver to preview. but when i upload it with the music file. it didnt play Link to comment Share on other sites More sharing options...
0 dpanda Posted January 11, 2004 Share Posted January 11, 2004 anybody? Link to comment Share on other sites More sharing options...
0 Adrian Posted January 11, 2004 Share Posted January 11, 2004 make sure that you have the files in the right place etc..also make sure the filenames are correct. Link to comment Share on other sites More sharing options...
0 noir Posted January 11, 2004 Share Posted January 11, 2004 The spaces in the filename could be the problem, some webservers don't like that Link to comment Share on other sites More sharing options...
0 dpanda Posted January 11, 2004 Share Posted January 11, 2004 <script> function stop() { music.src=""; } </script> <bgsound id="music" src="Music/infernal.mp3" loop="0" autostart="true"> <a onClick="stop()" ><font color="#CC3300" face="Comic Sans MS">Click here to stop music. =)</font></a> <font color="#FFFF99" face="Comic Sans MS"> </font> this is what i type in. im sure its the right directory and stuff. Link to comment Share on other sites More sharing options...
0 idbuythatforadollar Posted January 11, 2004 Share Posted January 11, 2004 cheers for ressurecting a 3 month old thread! ;) Link to comment Share on other sites More sharing options...
0 Xeron Posted January 11, 2004 Share Posted January 11, 2004 Make sure the path and filename to the music file is in exactly the same case as it is on the server. Windows doesn't care about uppercase and lower case, but Linux and UNIX do. Link to comment Share on other sites More sharing options...
0 dpanda Posted January 12, 2004 Share Posted January 12, 2004 yes...im sure its same. Link to comment Share on other sites More sharing options...
0 Rathamon Posted January 12, 2004 Share Posted January 12, 2004 please dont do it dude ,there is really no good reason for it Link to comment Share on other sites More sharing options...
0 john smith 1924 Veteran Posted January 12, 2004 Veteran Share Posted January 12, 2004 amen rathamon. PLEASE DO NOT!!! Link to comment Share on other sites More sharing options...
0 dpanda Posted January 12, 2004 Share Posted January 12, 2004 i will provide a stop button for the music. my friends are saying that is something that is lacking from it. and i need to learn it for my school work too...=( Link to comment Share on other sites More sharing options...
0 hifive Posted January 14, 2004 Share Posted January 14, 2004 For the source, try putting the direct url to the file: http://site.com/music/song.mp3 That usually solves things for me. Link to comment Share on other sites More sharing options...
0 dpanda Posted January 17, 2004 Share Posted January 17, 2004 tried doing that. nope...=( Link to comment Share on other sites More sharing options...
0 Fantmx Posted January 18, 2004 Share Posted January 18, 2004 Just a guess here, but you have the loop value set to 0. Try changing that to 1 or -1 if you want infinite loops. Link to comment Share on other sites More sharing options...
0 dpanda Posted January 22, 2004 Share Posted January 22, 2004 it doesnt even start... Link to comment Share on other sites More sharing options...
Question
Agent_of_Knowledge
I haven't coded in html for years and apparentlly I need to re-learn everything. I just wanted to know the code that needs to be implemented, to get a background .wav playing automatically once the user reaches that desired page.
Anyone have an idea?
Thanks.
Cheers!
Link to comment
Share on other sites
25 answers to this question
Recommended Posts