...

View Full Version : embed music w/playlist



nesvinz
11-23-2005, 07:03 AM
hi...
how can i embed music that have playlist of the song for the viewer to click then play.

plzz.. need a sample code..:(

whizard
11-23-2005, 04:44 PM
Try this thread (http://codingforums.com/showthread.php?t=50666).

Dan

nesvinz
11-25-2005, 07:21 AM
Thanx for the codes, but how about if when they open the page it will automatic play then when if they want to chose they will click the option song & the current song will stop.

thax a lot..

i hope u can help me again.

:)

_Aerospace_Eng_
11-25-2005, 07:44 AM
That code is there too. Its just a matter of reading the thread.

nesvinz
12-09-2005, 01:43 PM
hi Aerospace thanx for the code but can u convert this code that you made to CSS form?



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Random mp3 Music Player</title>
<style type="text/css">
<!--
#jukebox {
text-align:center;
}
-->
</style>
<script type="text/javascript">
<!--
nummp3 = 5
day = new Date()
z = day.getTime()
y = (z - (parseInt(z/1000,10) * 1000))/10
x = parseInt(y/100*nummp3,10) + 1
if (x == (1))
mp3=("http://nesvinz.bravehost.com/music/Lintik.wav")
if (x == (2))
mp3=("http://nesvinz.bravehost.com/music/Ngayong%20gabi.wav")
if (x == (3))
mp3=("http://nesvinz.bravehost.com/music/Rivermaya%20-%20Makaaasa%20ka.wav")
if (x == (4))
mp3=("http://nesvinz.bravehost.com/music/06%20-%20Track.wav")
if (x == (5))
mp3=("http://nesvinz.bravehost.com/music/WO62CF~1.wav")
function song(){
document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('cancion').value+"' name='MediaPlayer1' width='300' height='69' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
}
//-->
</script>
</head>

<body>
<div id="jukebox">JUKEBOX<br><br>
<select id="cancion" onchange="song()" size="1">
<option value="none">::::::::::::: Choose Your Song Here :::::::::::::</option>
<option value="http://nesvinz.bravehost.com/music/Lintik.wav">Lintik</option>
<option value="http://nesvinz.bravehost.com/music/Ngayong%20gabi.wav">NgaYonG GaBi</option>
<option value="http://nesvinz.bravehost.com/music/Rivermaya%20-%20Makaaasa%20ka.wav">MaKaasa Ka</option>
<option value="http://nesvinz.bravehost.com/music/06%20-%20Track.wav">fAlleN</option>
<option value="http://nesvinz.bravehost.com/music/WO62CF~1.wav">WolfGanG</option>
</select><br><br>
<span id="music1">
<script type="text/javascript">
<!--
document.write('<embed type="application/x-mplayer2" '
+'pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" '
+'src="'+mp3+'" '
+'name="MediaPlayer1" '
+'width="300" '
+'height="69" '
+'controltype="2" '
+'showcontrols="1" '
+'showstatusbar="1" '
+'autostart="true">'
+'</embed>');
//-->
</script>
</span>
</div>
</body>
</html>


thanx again :thumbsup:

_Aerospace_Eng_
12-09-2005, 07:21 PM
What do you mean by CSS form? I'm guessing you are trying to use the code on a place like myspace and it won't let you because of the javascript. This can't be done, I think you should try to understand the basics of html before you try to take on too much.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum