You are here: Forum Home / RapidWeaver User Forum / HTML, CSS, and Design Help / Thread
Hi Guys,
I??m using RW to put up a band site, the url is coldtrainblues.com, on the page entitled ??TheJamz? I wish to place an mp3 playe with samples of the songs on the album. I got the mp3 playe code fro http://www.premiumbeat.com/flash_resources/free_flash_music_player/multiple_tracks_mp3_player_menu.php and using that I inserted the code,
<!—Begin Copy/Paste—>
<div id=“flashPlayer”>
This text will be replaced by the flash music player.
</div>
var so = new SWFObject(“playerMultipleList.swf”, ??ColdtrainBlues?, ??295?, ??200?, ??7?, ??#FFFFFF”);
so.addVariable(“autoPlay?,“no”)
so.addVariable(“playlistPath?,“ColdtrainBlues.xml”)
so.write(“flashPlayer”);
<!—End Copy/Paste—>
</body>
</html>
on the style page, I then used Apple Works to construct the .xml file, it looks like this, (1 of 13 songs)
<track>
http://www.coldtrainblues.com/song1.mp3</path>
<title>Don??t Know Why- ColdtrainBlues</title>
</track>
Here are my questions:
1. Do the titles of the songs have to have no spaces, or is that another file, with shortened names, ie dontknow.mp3
<track>
http://www.coldtrainblues.com/dontknow.mp3</path>
<title>Don??t Know Why- ColdtrainBlues</title>
</track>
2. Where in RW do I insert the .xml data
3. I would like to position the mp3 player to the right of the text in the open space, is this possible?
4. I would like to create a folder with all of the songs in it, or should the actual mp3 files be uploaded separately.
Best Regards,
Earl J. Foster Jr.
My new CD is on sale at: http://www.cdbaby.com/cd/shampnthechill,
Here are my questions:
1. Do the titles of the songs have to have no spaces, or is that another file, with shortened names, ie dontknow.mp3
The titles of the songs can have spaces, but the filename can’t. So between the <title> and </title> tags just enter the title you want to appear as the music plays.
2. Where in RW do I insert the .xml data
I would recommend that you try to get the player working on a HTML Page first. Just paste the code in and alter the pathnames to suit your needs, eg:
var so = new SWFObject("assets/playerMultipleList.swf", ??ColdtrainBlues?, ??295?, ??200?, ??7?, ??#FFFFFF");
so.addVariable("autoPlay?,"no")
so.addVariable("playlistPath?,"assets/ColdtrainBlues.xml")
so.write("flashPlayer");
Here I’m deciding to upload the ‘.swf’ and’.xml’ files using Page Assets and have added ‘assets/’ to the pathnames. If this doesn’t work, remove the ‘assets/’ in front of ‘ColdtrainBlues.xml’. If you wish, you can have ‘assets/song1.mp3’ etc in the xml file too and upload the songs via Page Assets.
I remember writing a ‘tutorial’ for this mp3 player in the old forum, and I would have used a HTML Page and Page Assets to get the player working. It is then quite easy to transfer to a Styled Text Page, remembering to apply ‘Ignore Formatting’ from the Format dropdown menu to avoid extraneous line-breaks.
4. I would like to create a folder with all of the songs in it, or should the actual mp3 files be uploaded separately.
Keeping all the songs in one folder is a good idea, and you can do this using Page Assets if you wish.
john
I remember writing a ‘tutorial’ for this mp3 player in the old forum, and I would have used a HTML Page and Page Assets to get the player working
Can’t find this just now, but I’ve checked through this User Contributed Tutorial on the Old Forum and the same information is given here (as well as the original tutorial from premiumbeat).
john
Hi Griff,
Thank you so much for your input, I modified my code to read,
<div id=“flashPlayer”>
This text will be replaced by the flash music player.
</div>
var so = new SWFObject(”/player_assets/playerMultipleList.swf”, “mymovie”, “295”, “200”, “7”, “#FFFFFF”);
so.addVariable(“autoPlay”,“no”)
so.addVariable(“playlistPath”,/player_assets/“coldtrainblues.xml”)
so.write(“flashPlayer”);
</body>
</html>
Should I paste the .xml file on this same page or in the assets page?
Here are my questions:
1. Do the titles of the songs have to have no spaces, or is that another file, with shortened names, ie dontknow.mp3The titles of the songs can have spaces, but the filename can’t. So between the <title> and </title> tags just enter the title you want to appear as the music plays.
2. Where in RW do I insert the .xml data
I would recommend that you try to get the player working on a HTML Page first. Just paste the code in and alter the pathnames to suit your needs, eg:
var so = new SWFObject("assets/playerMultipleList.swf", ??ColdtrainBlues?, ??295?, ??200?, ??7?, ??#FFFFFF");
so.addVariable("autoPlay?,"no")
so.addVariable("playlistPath?,"assets/ColdtrainBlues.xml")
so.write("flashPlayer");Here I’m deciding to upload the ‘.swf’ and’.xml’ files using Page Assets and have added ‘assets/’ to the pathnames. If this doesn’t work, remove the ‘assets/’ in front of ‘ColdtrainBlues.xml’. If you wish, you can have ‘assets/song1.mp3’ etc in the xml file too and upload the songs via Page Assets.
I remember writing a ‘tutorial’ for this mp3 player in the old forum, and I would have used a HTML Page and Page Assets to get the player working. It is then quite easy to transfer to a Styled Text Page, remembering to apply ‘Ignore Formatting’ from the Format dropdown menu to avoid extraneous line-breaks.
4. I would like to create a folder with all of the songs in it, or should the actual mp3 files be uploaded separately.
Keeping all the songs in one folder is a good idea, and you can do this using Page Assets if you wish.
john
Should I paste the .xml file on this same page or in the assets page?
I would upload all files (.swf, .xml .mp3) via Page Assets if this is the route you’re taking. The question is whether the ‘.xml’ file needs to be addressed specifically (eg ‘page1_assets/example.xml’) or not (eg ‘example.xml’). This depends on how what the ‘.swf’ requires, so try both.
john
PS The syntax is different if you’re using RW’s default file/folder structure, ie ‘assets/example.xml’ instead of ‘page1_assets/example.xml’. RW’s default file/folder structure is what you get when you start a new project, so maybe try this first.
Hi Griff,
I placed the following code on my page:
<div id=“flashPlayer”>
This text will be replaced by the flash music player.
</div>
var so = new SWFObject(”/player_assets/playerMultipleList.swf”, “mymovie”, “295”, “200”, “7”, “#FFFFFF”);
so.addVariable(“autoPlay”,“no”)
so.addVariable(“playlistPath”,/player_assets/“coldtrainblues.xml”)
so.write(“flashPlayer”);
</body>
</html>
In your opinion is this the right code?
I still have not been able to get it to work. I created a html page and pasted this code in still no joy.
I created a .xml file with thirteen song titles on it, this is an example of one <track>
http://www.coldtrainblues.com/dontknow.mp3</path>
<title>Don??t Know Why- ColdtrainBlues</title>
</track>
I have been working on the actual mp3 files, reducing the run time to about 45 seconds, I plan to put them in the assets file, in a folder, what do you think.
Shampen
I still have not been able to get it to work
Maybe try the single mp3 player first? This should check out some of the pathnames: getting the pathnames right is usually the key. Unfortunately, I don’t have access to RW on a mac at the moment, so I can’t try your code. But maybe ‘player_assets/’ instead of ‘/player_assets/ will do the trick?
john
Hi Griff,
I’ll give it a try, but I’m starting to get discouraged.
I still have not been able to get it to work
Maybe try the single mp3 player first? This should check out some of the pathnames: getting the pathnames right is usually the key. Unfortunately, I don’t have access to RW on a mac at the moment, so I can’t try your code. But maybe ‘player_assets/’ instead of ‘/player_assets/ will do the trick?
john