前麵漏了一步,應該是五步:

來源: 競選 2010-08-15 01:47:35 [] [博客] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (4694 bytes)
回答: Thank you so much!!!!!vudcl2010-08-14 22:08:26
第一步:把你要播放器播放的所有曲子上傳到網上(建議使用文學城的上傳網站http://web.wenxuecity.com/upload.php)並獲得得它們的網址。我得到的是:

(1)http://space.wenxuecity.com/media/1281688329.mp3
(2)http://space.wenxuecity.com/media/1281688668.mp3
(3)http://space.wenxuecity.com/media/1281688907.mp3
(4)http://space.wenxuecity.com/media/1281689171.mp3

第二步:編寫內容為如下所示的文件,設文件名為songs.xml (文件名可以任意但其後綴必須是xml,即XML):

<?xml version='1.0' encoding='UTF-8' ?> <playlist version='1' xmlns='http://xspf.org/ns/0/'> <title>Sample PHP Generated Playlist</title> <info>littlesound</info> <trackList> <track><location>http://space.wenxuecity.com/media/1281688329.mp3</location><annotation> 01. 讓世界充滿愛:序曲</annotation><info>blank</info></track> <track><location>http://space.wenxuecity.com/media/1281688668.mp3</location><annotation> 02. 讓世界充滿愛:走向明天</annotation><info>blank</info></track> <track><location>http://space.wenxuecity.com/media/1281688907.mp3</location><annotation> 03. 讓世界充滿愛:幸福平安</annotation><info>blank</info></track> <track><location>http://space.wenxuecity.com/media/1281689171.mp3</location><annotation> 04. 讓世界充滿愛:永不分離</annotation><info>blank</info></track> </trackList> </playlist>

第三部:把songs.xml上傳到網上(建議用http://web.wenxuecity.com/upload.php),得到它的網址。我得到的songs.xml的網址是:http://space.wenxuecity.com/media/1281695401.xml

第四步:在你的博客網頁中插入如下的HTML代碼:

<embed style="WIDTH: 280px; HEIGHT: 180px" height="80" type="application/octet-stream" pluginspage="http://www.macromedia.com/go/getflashplayer" width="400" src="http://space.wenxuecity.com/media/1234581326.swf" border="0" wmode="transparent" quality="high" menu="false" flashvars="&config=http://space.wenxuecity.com/media/1277970459.xml&file=http://space.wenxuecity.com/media/1281695401.xml" />

特別注意其中輸入了地址:http://space.wenxuecity.com/media/1281695401.xml。這段代碼將產生如下的能正常工作的播放器:



第五步(optional):如果你不滿意以上結果,可以做些小修改。比如,你可能覺得播放器下部過長需要縮短些,這可以把第四步中embed中的參數style="WIDTH: 280px; HEIGHT: 180px"中的180改小些。顯而易見你也可以改變寬度參數280來改變播放器的寬度。如果你覺得播放器顏色的底色與文字對比度太小導致看不清文字,你可以把整個播放器置於一個黑色的表格中,即把第四步中的embed整個地放進一個黑色表格中,代碼如下:

<table style="WIDTH: 30.2%; HEIGHT: 167px" border="1" cellspacing="1" cellpadding="1" bgcolor="#000000"><tbody><tr><td>

<embed style="WIDTH: 280px; HEIGHT: 180px" height="80" type="application/octet-stream" pluginspage="http://www.macromedia.com/go/getflashplayer" width="400" src="http://space.wenxuecity.com/media/1234581326.swf" border="0" wmode="transparent" quality="high" menu="false" flashvars="&config=http://space.wenxuecity.com/media/1277970459.xml&file=http://space.wenxuecity.com/media/1281695401.xml" />
</td></tr></tbody></table>

這段代碼將產生如我原帖中所示的黑色播放器。

所有跟帖: 

非常感激你寫下如此詳盡的步驟! -vudcl- 給 vudcl 發送悄悄話 (0 bytes) () 08/18/2010 postreply 22:28:22

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”