这是我以前写的,如何制作带xml文件的播放器,希望对你有用!

做Flash播放器一共需要三个文件,一个mp3player的flash,另外两个是xml文件(一个是设置字体或者播放器的config xml文件,另一个是你的music playlist文件)
你先试个简单点的,不换字体颜色, mp3player的flash和config xml都先用我帖里的,这样你自己只写一个music playlist文件就可以了.

music playlist文件格式如下:(把里面的音乐连接和音乐名字换成你的,然后save as 成一个名字叫 playlist.xml的文件)

<?xml version='1.0' encoding='UTF-8' ?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<title>Sample PHP Generated Playlist</title>
<info>http://www.jeroenwijering.com/</info>
<trackList>
<track><location>http://space.wenxuecity.com/media/1234554348.mp3</location><annotation> 01. Walking Through Clouds </annotation><info>blank</info></track>
<track><location>http://space.wenxuecity.com/media/1234554203.mp3</location><annotation> 02. Touched by Love </annotation><info>blank</info></track>
<track><location>http://space.wenxuecity.com/media/1234554518.mp3</location><annotation> 03. Deep Green Summer </annotation><info>blank</info></track>

</trackList>
</playlist>

把这个playlist.xml文件上传到WXC,得到一个xml的连接.把下面的code里面 <b>file=</b> 后面的连接换成你得到的连接,然后把这几行code放到帖里就可以了(width和height是控制播放器宽和高的两个参数,你可以自己调整)


<embed name="mp3player" pluginspage="http://www.macromedia.com/go/getflashplayer"
src="http://space.wenxuecity.com/media/1234581326.swf" width="250" height=200"
type="application/x-shockwave-flash" border="0" wmode="transparent"
flashvars="&config=http://space.wenxuecity.com/media/1234824478.xml&file=http://space.wenxuecity.com/media/1234582544.xml" quality="high" menu="false" />

按照上面方法做出来的播放器是透明的.

把上面的播放器做成功了,如果再想调整播放器的颜色,就是要改一下上面config=后的文件:
http://space.wenxuecity.com/media/1234824478.xml
(调整frontcolor和lightcolor两个参数,0x后面的值可以改变颜色)

把你自己调整好的config文件上传,然后再替换到上面的code里就可以了:)))

所有跟帖: 

回复:谢谢lili!可盼到这一天了!看着象天书,俺也试试。 -琴悠- 给 琴悠 发送悄悄话 琴悠 的博客首页 (0 bytes) () 02/02/2010 postreply 11:36:47

Good luck and have fun~!:) -lili~- 给 lili~ 发送悄悄话 lili~ 的博客首页 (0 bytes) () 02/02/2010 postreply 11:55:59

谢丽丽代劳,我试着回答,但帖上code就直接show出来了,code本身却看不到。 -Xiaokanshijie- 给 Xiaokanshijie 发送悄悄话 Xiaokanshijie 的博客首页 (0 bytes) () 02/02/2010 postreply 11:38:21

举手之劳而已! :) -lili~- 给 lili~ 发送悄悄话 lili~ 的博客首页 (65 bytes) () 02/02/2010 postreply 11:55:22

哈,老将出马,一个顶俩!我也正在试怎样把源码发出来呢。这下省了:)) -左右开弓- 给 左右开弓 发送悄悄话 左右开弓 的博客首页 (0 bytes) () 02/02/2010 postreply 12:27:13

哈, 左右开弓一个顶仨:) -lili~- 给 lili~ 发送悄悄话 lili~ 的博客首页 (78 bytes) () 02/02/2010 postreply 12:44:38

谢谢,谢谢笑班,谢谢左右(以为你已经是大腕了) -mimi_2000- 给 mimi_2000 发送悄悄话 mimi_2000 的博客首页 (114 bytes) () 02/02/2010 postreply 13:42:49

偶这是抛砖引玉:)) 你请的是班长,俺不能抢了班班们的头功是不是? -左右开弓- 给 左右开弓 发送悄悄话 左右开弓 的博客首页 (44 bytes) () 02/02/2010 postreply 19:12:56

谢谢丽丽!俺刚在学制帖,先收藏了。 -白芦- 给 白芦 发送悄悄话 白芦 的博客首页 (0 bytes) () 02/02/2010 postreply 14:11:43

KKYD会有这么多真诚热心人,真让人感动,谢谢lili了!! -加国音乐- 给 加国音乐 发送悄悄话 加国音乐 的博客首页 (171 bytes) () 02/02/2010 postreply 18:26:44

一程歌的帖中的LINK还是有效的,非常详尽,请看: -左右开弓- 给 左右开弓 发送悄悄话 左右开弓 的博客首页 (149 bytes) () 02/02/2010 postreply 20:01:43

不好意思,不知WXC对有过滤。上面LINK变得无效了! -左右开弓- 给 左右开弓 发送悄悄话 左右开弓 的博客首页 (0 bytes) () 02/02/2010 postreply 20:25:33

不好意思,不知WXC对"DDWH.COM"有过滤。上面LINK变得无效了! -左右开弓- 给 左右开弓 发送悄悄话 左右开弓 的博客首页 (0 bytes) () 02/02/2010 postreply 20:26:54

还是你了解我的差距在哪里... -加国音乐- 给 加国音乐 发送悄悄话 加国音乐 的博客首页 (65 bytes) () 02/02/2010 postreply 20:27:27

再谈一程歌的帖中的LINK还是有效的,非常详尽,请看: -左右开弓- 给 左右开弓 发送悄悄话 左右开弓 的博客首页 (271 bytes) () 02/02/2010 postreply 21:18:41

先收藏 -加国音乐- 给 加国音乐 发送悄悄话 加国音乐 的博客首页 (2138 bytes) () 02/02/2010 postreply 18:57:42

请您先登陆,再发跟帖!