Tag Archives: flash

Website Music Player

I am finally able to sit down and tell you about the media player that I put on my website. As you can see to the right is a music player and the code that I used is valid XHTML. So here we go:

I first used the files from PremiumBeat.com and put them on my site. But then I didn’t want to edit the .xml file everytime that I added or deleted a song in the mp3 folder. So I found a script that I had from a long time ago from another mp3 player from another site that I built and had to modify it. So here is all the files and how to add them to your site.

Download .zip file here. (I accidentally deleted it awhile ago the link should work now!)

Upload those files to your server where you want the player to go and remember where you stored them (because you will need that url later to input and grab your files to play.

Then take a look at the sample HTML doc in your editor (NOT MS WORD, preferably something like notepad or editpad lite). Also OPEN the playlist.php file in the same editor. (NOTE THIS IS ALL FROM YOUR SERVER)

You are going to need to change a few things in order to have the music you want instead of mine.

So now that you have the HTML file open and the playlist file open. You need to change the following things:

On the sampleEmbedCode.html:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!-- End Copy/Paste -->
 
<!--Valid XHTML Code for IE and Firefox to Put in widget sidebar for wordpress-->
<div>
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="200" height="250">
    <param name="movie" value="http://www.thomasnorberg.com/mediaplayer/playerMultipleList.swf" />
<param name="FlashVars" value="autoPlay=no&amp;playlistPath=http://www.thomasnorberg.com/mediaplayer/playlist.php&amp;overColor=#822601&amp;playerSkin=2"/>
<!--[if !IE]> <-->
<script type="text/javascript" src="http://www.thomasnorberg.com/mediaplayer/swfobject.js"></script>
<div id="flashPlayer">
  This text will be replaced by the flash music player.
</div>
 
<script type="text/javascript">
   var so = new SWFObject("http://www.thomasnorberg.com/mediaplayer/playerMultipleList.swf", "mymovie", "295", "200", "7", "#FFFFFF");
   so.addVariable("autoPlay","no")
   so.addVariable("playlistPath","http://www.thomasnorberg.com/mediaplayer/playlist.php")
   so.write("flashPlayer");
</script>
<!--> <![endif]-->
</object></div>
 
<!-- End Copy/Paste>

and on the on the playlist.php file:

1
2
$dir = "mp3/";
$url = "http://www.thomasnorberg.com/mediaplayer/playerMultipleMenuPackage/mp3/";

Change everything that has http://www.thomasnorberg.com/mediaplayer/ to where ever you put the MP3 Player folder that you uploaded to your website.

Now when you open your sampleEmbedCode.html file again you should have the IsWar.mp3 playing. Now you can either delete that file from the mp3 folder and add new songs or keep it and add songs either way it is up to you. That is it so let me know if you have any complications that I can help with.

GD Star Rating
loading...
GD Star Rating
loading...