| |
|
Welcome to KnowledgeSutra - Dear Guest | |
How To Put Music Into Dreamweaver?
Started by marcus.360, Aug 08 2008 08:38 AM
19 replies to this topic
#2
Posted 08 August 2008 - 08:53 AM
there are a couple of ways to do this. the first is very basic: the user goes to the site, the sound file starts playing. the code is:
but of course, if the user were to hate that song or something, they would have no way of stopping it without muting their volume, which can be annoying.
the best way to do this is to embed a flash player... there are many good ones out there, such as this one, or you can make one yourself.
finally, an embedded quicktime player, as is on many sites. the code would look something like this:
on a personal note though, i dont like autoplaying music - i like having some choice in the matter... my noscript would block it anyway
hope i helped
<bgsound src="whatever.mp3" loop="infinite"/>
but of course, if the user were to hate that song or something, they would have no way of stopping it without muting their volume, which can be annoying.
the best way to do this is to embed a flash player... there are many good ones out there, such as this one, or you can make one yourself.
finally, an embedded quicktime player, as is on many sites. the code would look something like this:
<embed src="media/whatever.mp3" autostart="true" loop="false" controller="true" id="whatever.mp3" name="bg song" pluginspage="http://www.apple.com/quicktime/download/"> </embed>
on a personal note though, i dont like autoplaying music - i like having some choice in the matter... my noscript would block it anyway
hope i helped
#4
Posted 08 August 2008 - 08:58 AM
if you go to the link i gave you, and scroll down a bit further, there are comprehensive instructions explaining how to use the player.
when it says you must use a xspf file: that is just a playlist format. here are instructions on how to make such playlists.
have fun!
when it says you must use a xspf file: that is just a playlist format. here are instructions on how to make such playlists.
have fun!
Edited by bthaxor, 08 August 2008 - 08:59 AM.
#6
Posted 08 August 2008 - 09:05 AM
here's an example of an embedded quicktime object.
all embed methods support file:/// protocols, so i guess it's up to you to choose which!
i'd personally go with xspf, because it's easier to change which song to play etc. because all you have to do is edit the xml file.
once again, it's up to you.
finally, please don't double-post...
all embed methods support file:/// protocols, so i guess it's up to you to choose which!
i'd personally go with xspf, because it's easier to change which song to play etc. because all you have to do is edit the xml file.
once again, it's up to you.
finally, please don't double-post...
#8
Posted 08 August 2008 - 09:11 AM
embed code:
then, the xspf file will look something like this:
replace the locations with the locations with your file.
download the swf file, save it in the same directory as the site.
tadaa!
<object type="application/x-shockwave-flash" width="400" height="170" data="http://yourdomain.com/xspf_player.swf?playlist_url=http://yourdomain.com/yourplaylistlist.xspf"> <param name="movie" value="file:///pathtositefolder/xspf_player.swf?playlist_url=file:///pathtositefolder/yourplaylistlist.xspf" /> </object>
then, the xspf file will look something like this:
<?xml version="1.0" encoding="UTF-8"?> <playlist version="1" xmlns="http://xspf.org/ns/0/"> <trackList> <track><location>file:///mp3s/song_1.mp3</location></track> <track><location>file:///mp3s/song_2.mp3</location></track> <track><location>file:///mp3s/song_3.mp3</location></track> </trackList> </playlist>
replace the locations with the locations with your file.
download the swf file, save it in the same directory as the site.
tadaa!
#9
Posted 08 August 2008 - 09:15 AM
So do i just copy and paste those into my dreamweaver "code" bit.
http://img120.imageshack.us/img120/1959/dr...averhelpgo5.jpg
http://img45.imageshack.us/img45/5285/drea...verhelp1ik0.png
http://img120.imageshack.us/img120/1959/dr...averhelpgo5.jpg
http://img45.imageshack.us/img45/5285/drea...verhelp1ik0.png
Edited by marcus.360, 08 August 2008 - 09:24 AM.
#10
Posted 08 August 2008 - 09:16 AM
yup...
also, if you're planning to upload this to the web, then this guide is about as comprehensive as it gets in terms of using this flash player...
also, if you're planning to upload this to the web, then this guide is about as comprehensive as it gets in terms of using this flash player...
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














