Mark Forums Read
  #1  
Old 07-21-2010, 10:04 AM
JavaScriptBank JavaScriptBank is offline
Senior Member
 
Join Date: Sep 2009
Posts: 130
JavaScriptBank is on a distinguished road
Default Web based JavaScript Media Player

Bring the sound of life - music to your visitors by this JavaScript. It is an advanced web based midi player that actually enables you to jump, pause, and manipulate the play list like never before.... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript
Code:
<SCRIPT language=JavaScript> <!-- Begin counter = 0; html = true; songs = new Array(); function addsong() { file = document.forms[0].file.value; if(file == "") { alert("Entra un nombre de archivo o da click en Examinar.."); } else { fn = file; while(fn.indexOf() != -1) { pos = fn.indexOf(); fn = fn.substring(fn.lenght); } if(fn.indexOf(".gif") == 1) { alert("Sólo sonidos o música"); } else { songs[counter] = file; document.forms[0].selMusica[counter] = new Option(fn, file, false, true); counter++; } document.forms[0].file.value = ""; } } function musica() { document.all.sound.src=document.clock.selMusica.options[document.clock.selMusica.selectedIndex].text; } function stop() { document.all.sound.src=""; } function count() { document.clock.songs.value=document.clock.selMusica.options.length; } function deletethis() { if(counter > 0) { counter--; document.forms[0].selMusica[counter] = null; songs[counter] = ""; } else { alert("No hay nada en la lista!"); } } function bajar() { document.clock.selMusica.options[document.clock.selMusica.selectedIndex++]; saber2(); saber(); } function subir() { document.clock.selMusica.options[document.clock.selMusica.selectedIndex--]; saber2(); saber(); } function saber() { document.clock.url.value=document.clock.selMusica.options[document.clock.selMusica.selectedIndex].text; } function saber2() { fn = document.clock.selMusica.options[document.clock.selMusica.selectedIndex].text; char = unescape("%5C"); while(fn.indexOf(char) != -1) { pos = fn.indexOf(char); fn = fn.substring(pos + 1, fn.length); document.clock.nombre.value=fn; } } // End--> </SCRIPT>
Step 2: Place HTML below in your BODY section
HTML
Code:
<BODY onclick=count() onload=count()> <BGSOUND id=sound src=""> <FORM name=clock><INPUT type=file name=file size="20"> <INPUT onclick=addsong() type=button value=Add><INPUT onclick=deletethis() type=button value=Delete><BR><INPUT onclick=musica() type=button value=Listen name=empezar> <INPUT onclick=stop() type=button value=Stop name=detener> You have:<INPUT readOnly size=2 name=songs>song(s) in the list.<BR>Name of the song:<INPUT size=25 name=nombre><INPUT onclick="saber2(); saber()" type=button value="Know Name & Url">Url of the song:<INPUT size=19 name=url> <BR><INPUT onclick=bajar() type=button value=MoveDown><INPUT onclick=subir() type=button value=MoveUp><BR><BR><SELECT multiple size=20 name=selMusica></SELECT> </FORM> </BODY>





Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
  #2  
Old 07-21-2010, 01:11 PM
mywebportal mywebportal is offline
Member
 
Join Date: Jun 2010
Posts: 36
mywebportal is on a distinguished road
Default

Thanks for sharing the code.
__________________
It is nice to be important but it is more important to be nice.
Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 05:38 PM.


Powered by vBulletin Version 3.6.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 2.4.0