Post by SubDevo on May 7, 2010 1:46:05 GMT -8
PopUp Music Player by SubDevo
Tested in IE, FF, Opera, Safari and Chrome.
You may be interested in THIS code instead for your player and more!
I have been meaning to post this for quite some time now...
This code gives you a popup music player for your forum! This is much better than having an embedded player that stops playing (and restarts) when you are trying to look through a forum. This code makes it much nicer for your members to be able to listen to uninterrupted music while visiting your forum.
Enjoy!!!
SubDevo
In order to use this code you must first go to player.myspace-player.com/ and create a playlist and a player. Just choose anonymous if you don't want to register. After you go through that process and you get the embed code, copy/paste it into "notepad" or similar.
Refer to that embed code for the following instructions.
Variables: Edit the Maroon portions.
var popTitle="My Music"; // Title of Popup window
The text that will appear in your popup window title bar.
var popStyle='background: #FFFFFF url("URL TO IMAGE")'; // Background color and image.
Put your background color and/or URL to a background image here.
/* GET THE FOLLOWING FROM YOUR EMBED CODE */
var purl="PLAYLIST URL"; // Playlist URL (.xml)
var playurl="SKIN URL"; // Skin URL (.swf)
var mHeight=320 // Height of player
var mWidth=280 // Width of player
Example embed code: Playlist URL (purl) Skin URL (playurl) Height (mHeight) Width (mWidth)
<center><embed src="player.myspace-player.com/swf/e88j5ob4a1/palm.swf" menu="false" quality="high" width="280" height="320" name="poqbum-dot-com" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="playlist=http%3A%2F%2Fplayer.myspace-player.com2F%2Fmp3player.xml" wmode="transparent"></embed></center><center><a href="http://www.myspace-player.com/"><small>Get Your Own Player!</small></a></center>
Put the following link in the same code area (global or main) as you do the code below.
Either put it in your header or footer depending on where you want it to appear on your page.
The "<center></center>" tags are optional.
Text Link Code:
<center>
<a href="javascript:popupPlayer()" title="Click to Launch Player in a New Window"><b>PopUp Music Player!</b></a>
</center>
Image Link Code:
<center>
<a href="javascript:popupPlayer()" title="Click to Launch Player in a New Window"><img src="URL TO IMAGE" border="0" alt="PopUp Music Player!" /></a>
</center>
Location: Global or Main Footer
<script type="text/javascript">
/* PopUp Music Player by SubDevo */
/* Global or Main Footer - Please leave this header intact. */
/* interoceandesigns.com or lsdp.proboards.com */
var popTitle="My Music"; // Title of Popup window
var popStyle='background: #FFFFFF url("URL TO IMAGE")'; // Background color and image.
/* GET THE FOLLOWING FROM YOUR EMBED CODE */
var purl="PLAYLIST URL"; // Playlist URL (.xml)
var playurl="SKIN URL"; // Skin URL (.swf)
var mHeight=320 // Height of player
var mWidth=280 // Width of player
var mPlayer= null;
function popupPlayer(){
if(mPlayer== null || mPlayer.closed){
var LinkCol=" "+document.linkColor;
var html='<html><head><title>'+popTitle+'</title><style type="text/css">body{'+popStyle+' top left;} A:link {text-decoration: none; color:'+LinkCol+';}</style></head><body>';
var mEmbed='<div style="width: '+mWidth+'px;"><embed src="'+playurl+'" menu="false" quality="high" width="'+mWidth+'" height="'+mHeight+'" name="poqbum-dot-com" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="playlist='+purl+'" wmode="transparent"></embed>';
mEmbed+="<center><a href='javascript:self.close()' style='color:"+parent.document.linkColor+";' title='Close this Window'><small>Close Player</small></a></center></div>";
mPlayer=window.open('','SubDevo','width='+(mWidth+40)+',height='+(mHeight+46)+',top=0,left=0,scrollbars=yes,resizable=yes');
mPlayer.focus();
with(mPlayer.document){open(); write(html+mEmbed+'</body></html>'); close();}
}else{mPlayer.focus();}
}
</script>
Tested in IE, FF, Opera, Safari and Chrome.
You may be interested in THIS code instead for your player and more!
I have been meaning to post this for quite some time now...
This code gives you a popup music player for your forum! This is much better than having an embedded player that stops playing (and restarts) when you are trying to look through a forum. This code makes it much nicer for your members to be able to listen to uninterrupted music while visiting your forum.
Enjoy!!!
SubDevo
In order to use this code you must first go to player.myspace-player.com/ and create a playlist and a player. Just choose anonymous if you don't want to register. After you go through that process and you get the embed code, copy/paste it into "notepad" or similar.
Refer to that embed code for the following instructions.
Variables: Edit the Maroon portions.
var popTitle="My Music"; // Title of Popup window
The text that will appear in your popup window title bar.
var popStyle='background: #FFFFFF url("URL TO IMAGE")'; // Background color and image.
Put your background color and/or URL to a background image here.
/* GET THE FOLLOWING FROM YOUR EMBED CODE */
var purl="PLAYLIST URL"; // Playlist URL (.xml)
var playurl="SKIN URL"; // Skin URL (.swf)
var mHeight=320 // Height of player
var mWidth=280 // Width of player
Example embed code: Playlist URL (purl) Skin URL (playurl) Height (mHeight) Width (mWidth)
<center><embed src="player.myspace-player.com/swf/e88j5ob4a1/palm.swf" menu="false" quality="high" width="280" height="320" name="poqbum-dot-com" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="playlist=http%3A%2F%2Fplayer.myspace-player.com2F%2Fmp3player.xml" wmode="transparent"></embed></center><center><a href="http://www.myspace-player.com/"><small>Get Your Own Player!</small></a></center>
Put the following link in the same code area (global or main) as you do the code below.
Either put it in your header or footer depending on where you want it to appear on your page.
The "<center></center>" tags are optional.
Text Link Code:
<center>
<a href="javascript:popupPlayer()" title="Click to Launch Player in a New Window"><b>PopUp Music Player!</b></a>
</center>
Image Link Code:
<center>
<a href="javascript:popupPlayer()" title="Click to Launch Player in a New Window"><img src="URL TO IMAGE" border="0" alt="PopUp Music Player!" /></a>
</center>
Location: Global or Main Footer
<script type="text/javascript">
/* PopUp Music Player by SubDevo */
/* Global or Main Footer - Please leave this header intact. */
/* interoceandesigns.com or lsdp.proboards.com */
var popTitle="My Music"; // Title of Popup window
var popStyle='background: #FFFFFF url("URL TO IMAGE")'; // Background color and image.
/* GET THE FOLLOWING FROM YOUR EMBED CODE */
var purl="PLAYLIST URL"; // Playlist URL (.xml)
var playurl="SKIN URL"; // Skin URL (.swf)
var mHeight=320 // Height of player
var mWidth=280 // Width of player
var mPlayer= null;
function popupPlayer(){
if(mPlayer== null || mPlayer.closed){
var LinkCol=" "+document.linkColor;
var html='<html><head><title>'+popTitle+'</title><style type="text/css">body{'+popStyle+' top left;} A:link {text-decoration: none; color:'+LinkCol+';}</style></head><body>';
var mEmbed='<div style="width: '+mWidth+'px;"><embed src="'+playurl+'" menu="false" quality="high" width="'+mWidth+'" height="'+mHeight+'" name="poqbum-dot-com" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="playlist='+purl+'" wmode="transparent"></embed>';
mEmbed+="<center><a href='javascript:self.close()' style='color:"+parent.document.linkColor+";' title='Close this Window'><small>Close Player</small></a></center></div>";
mPlayer=window.open('','SubDevo','width='+(mWidth+40)+',height='+(mHeight+46)+',top=0,left=0,scrollbars=yes,resizable=yes');
mPlayer.focus();
with(mPlayer.document){open(); write(html+mEmbed+'</body></html>'); close();}
}else{mPlayer.focus();}
}
</script>