richardiler172
05-23-2003, 09:27 AM
this may be an idiotic question but is there a way to have th bg music to a page play once and then switch song??
|
Click to See Complete Forum and Search --> : music richardiler172 05-23-2003, 09:27 AM this may be an idiotic question but is there a way to have th bg music to a page play once and then switch song?? Jona 05-23-2003, 11:38 AM Yes, it's possible but not with HTML exclusively. This will take some Javascript programming. That is, to my knowledge there is no built-in HTML that will do this. richardiler172 05-23-2003, 03:04 PM anyone know how it's done exactly? Jona 05-23-2003, 03:08 PM <script type="text/javascript"> <!-- var change; var f2 = "file2.mid"; //change to the name of your second file function playSong(){ document.getElementByTagName("BGSOUND")[0].src=f2; } function start(){ var time = 60; //amount in seconds time *= 100; change = setTimeout("playSong();", time); } //--> </script></head><body onload="start();"> <bgsound src="file1.mid"> </body></html> webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |