Astra-Rudra
New Member
Below code is told to be added in the header
This Puts a sliding mp3 player in the forum but , when i move to the next page , the song stops and i have to click play again .
So is there a way to make it stay running while the whole page changes ?
Thanks in advance
PHP:
<style type="text/css">
position:static;
#topbar{
border: 1px solid blu;
padding: 0px;
background-color: black;
width: 135px;
height: 25px;
visibility: hidden;
}
</style>
<script type="text/javascript">
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 0 //set x offset of bar in pixels
var startY = 0 //set y offset of bar in pixels
var verticalpos="frombottom" //enter "fromtop" or "frombottom"
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}
function staticbar(){
barheight=document.getElementById("topbar").offsetHeight
var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("topbar");
stayTopLeft();
}
if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
</script>
<div id="topbar">
<object id="NSPlay" width=100% height=25 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" value="http://scfire-mtc-aa03.stream.aol.com:80/stream/1024" />
<param name="ShowControls" value=1 />
<param name="ShowPositionControls" value=0 />
<param name="ShowAudioControls" value=1 />
<param name="ShowTracker" value=0 />
<param name="ShowDisplay" value=0 />
<param name="ShowStatusBar" value=0 />
<param name="ShowGotoBar" value=0 />
<param name="ShowCaptioning" value=0 />
<param name="AutoStart" value=0 />
<param name="AnimationAtStart" value=0 />
<param name="TransparentAtStart" value=0 />
<param name="AllowChangeDisplaySize" value=0 />
<param name="AllowScan" value=0 />
<param name="EnableContextMenu" value=0 />
<param name="ClickToPlay" value=0 />
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" src="http://scfire-mtc-aa03.stream.aol.com:80/stream/1024" width=100% height=25 showcontrols=1 showpositioncontrols=0 showaudiocontrols=1 showtracker=0 showdisplay=0 showstatusbar=0 showgotobar=0 showcaptioning=0 autostart=0 autorewind=0 animationatstart=0 transparentatstart=0 allowchangedisplaysize=0 allowscan=0 enablecontextmenu=0 clicktoplay=0></embed>
</object>
</div>
This Puts a sliding mp3 player in the forum but , when i move to the next page , the song stops and i have to click play again .
So is there a way to make it stay running while the whole page changes ?
Thanks in advance