Author Topic: Preview music before downloading!  (Read 1599 times)

Hi, ever wanted to know what a music file sounded like before downloading?

now you can with this simple code which comprises of basic HTML and Javascript.

Quote
<HTML>
<HEAD>
<TITLE>title goes Here</TITLE>
</HEAD>
<script language="JavaScript">
  <!--
 
  function play(nOption) {
     if (nOption == 1)
        document.all.sound.src="SOUND 1 URL HERE";
     else if (nOption == 2)
             document.all.sound.src="SOUND 2 URL HERE";
     else if (nOption == 3)
             document.all.sound.src="SOUND 3 URL HERE";
     
             
     }
  //-->
</script>
<BODY>
<bgsound id="sound" src="">
<font face="Arial, Helvetica, sans-serif">
<h2><u>sound files</u></h2><br>
<h4>Click the text to play the sound, press the stop button on your browser to stop playing the sound.</h4>
<a href='javascript:void(0)' onclick=play(1)>sound 1</a><br>
<a href='javascript:void(0)' onclick=play(2)>sound 2</a><br>
<a href='javascript:void(0)' onclick=play(3)>Sound 3</a><br>
</font>
</BODY>
</HTML>

Just looking at the code, you can tell what to do. You upload all of the sounds in .mp3 format at the lowest bitrate possible to a site like freewebs, then put the url of the files where it says "SOUND # URL HERE". you then rename where it says "sound #" to the name of the soundfile you have uploaded. also if you want the sound to play when you move the mouse over the link instead of clicking it, change "onclick" to "onmouseover". to stop any sound that is currently playing, click the stop button on your browser. Simple.
« Last Edit: September 21, 2008, 10:53:59 AM by paul_UK »

I thought HTML was disabled in these forums.

I bet previewing it in BL is easier...

No but thats the thing, you can decide wether or not to download BEFORE downloading it, then putting it into your bl music folder, starting the game, checking it in the musics list, starting a new game, placing the music block and selecting it  :cookieMonster:

i don't trust the amiga virus starter D:


...I didnt start that bloody virus.


I made the soundpack and gave clear instructions on how to apply it, someone just dragged a folder inside the music folder with all the sounds in, causing a virus. Unfortunately zombie, youre one of the many people who is too handicapped to take in what realy happened, you'd rather point fingers at the wrong person because its easier.