DatsNotFunny
11-01-2005, 10:07 PM
Here's the code taken from another thread. I have 2 problems. One is that the music wont play when I click ">". The other is rpoblem I have is how do I transform the "song.mp3" to sumthing that can be read by the script. I hope I'm askin the right questions.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<style type="text/css">
#mainbodyMP{background-color: #060A91; width: 300px; height: 30px; border-top: 2px solid #F67E0E; border-right: 2px solid #000; border-bottom: 2px solid #F67E0E; border-left: 2px solid #000;}
#navlistMP
{
margin: 0px;
margin-bottom: 0px;
margin-right: 0px;
padding: 0px;
padding-left: 245px;
background-color: #060A91;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
padding-bottom: 3px;
padding-top: 3px;
}
#navlistMP a, #navlistMP a:link, #navlistMP a:visited
{
padding: 1px;
padding-left: 0.5em;
padding-right: 0.5em;
color: #000000;
font-weight: bold;
text-decoration: none;
}
#navlistMP a:hover, #navlistMP a:active, #navlistMP a:focus
{
padding: 1px;
padding-left: 0.5em;
padding-right: 0.5em;
text-decoration: none;
}
#navlistMP li
{
padding-right: 1px;
display: inline;
font-size: 0.6em;
}
#navlistMP ul
{
margin: 0px;
padding: 0px;
}
#navlistMP #active a { background-color: #DDDDDD; }
</style>
<div id="mainbodyMP">
<marquee align="left" behavior="scroll|slide|alternate" bgcolor="#000" height="25" width="300" direction="left|right" loop="infinite|value" scrollamount="1" scrolldelay="1" title="music player"><font face="lithos pro regular" color="#F67E0E" size="1">System of a Down...Mezmerise...Question!</font></marquee>
<div id="navbarMP">
<div id="navcontainerMP">
<ul id="navlistMP">
<li id="active">
<a href="/zentcart125d/media/sample06 A Most Prcecious Gift.mp3" onclick="play(this.href);return false">></a></li>
<a href="#" onclick="stopsong();return false">||</a>
<span id="music1"></span>
</span>
</ul>
</div>
</div>
</div>
<script type="text/javascript">
function play(what){
document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+what+"' name='MediaPlayer1' width='1' height='1' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true' loop='false'></embed>";
}
function stopsong(){
document.getElementById('music1').innerHTML="";
}
</script>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<style type="text/css">
#mainbodyMP{background-color: #060A91; width: 300px; height: 30px; border-top: 2px solid #F67E0E; border-right: 2px solid #000; border-bottom: 2px solid #F67E0E; border-left: 2px solid #000;}
#navlistMP
{
margin: 0px;
margin-bottom: 0px;
margin-right: 0px;
padding: 0px;
padding-left: 245px;
background-color: #060A91;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
padding-bottom: 3px;
padding-top: 3px;
}
#navlistMP a, #navlistMP a:link, #navlistMP a:visited
{
padding: 1px;
padding-left: 0.5em;
padding-right: 0.5em;
color: #000000;
font-weight: bold;
text-decoration: none;
}
#navlistMP a:hover, #navlistMP a:active, #navlistMP a:focus
{
padding: 1px;
padding-left: 0.5em;
padding-right: 0.5em;
text-decoration: none;
}
#navlistMP li
{
padding-right: 1px;
display: inline;
font-size: 0.6em;
}
#navlistMP ul
{
margin: 0px;
padding: 0px;
}
#navlistMP #active a { background-color: #DDDDDD; }
</style>
<div id="mainbodyMP">
<marquee align="left" behavior="scroll|slide|alternate" bgcolor="#000" height="25" width="300" direction="left|right" loop="infinite|value" scrollamount="1" scrolldelay="1" title="music player"><font face="lithos pro regular" color="#F67E0E" size="1">System of a Down...Mezmerise...Question!</font></marquee>
<div id="navbarMP">
<div id="navcontainerMP">
<ul id="navlistMP">
<li id="active">
<a href="/zentcart125d/media/sample06 A Most Prcecious Gift.mp3" onclick="play(this.href);return false">></a></li>
<a href="#" onclick="stopsong();return false">||</a>
<span id="music1"></span>
</span>
</ul>
</div>
</div>
</div>
<script type="text/javascript">
function play(what){
document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+what+"' name='MediaPlayer1' width='1' height='1' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true' loop='false'></embed>";
}
function stopsong(){
document.getElementById('music1').innerHTML="";
}
</script>
</body>
</html>