。◕‿◕。小螃蟹's profile❤ ♬♡.゚゚・εїз ♧ ➽๑•ิ.•ัﻬஐ☊...PhotosBlogLists Tools Help

Blog


    September 04

    音乐列表播放全攻略

    首先感谢小绿人,我是在看到他的Spaces才猛然发现可以这样做的,但是不知道出自什么原因,他并没有写出这方面的教程,我来补足吧。

    第一步,我们来访问 http://www.jeroenwijering.com/?item=Flash+Mp3+Player 这个网址。见图一

    图一

    点击图一中的Flash MP3 Player,下载flash_mp3_player.zip,解压缩得到如图二所示几个文件和文件夹,其中mp3这个文件夹没有用,可以删除。

    图二

    整个列表播放我们需要准备两个文件。一个SWF文件和一个XML文件。我们打开mp3player.fla来修改几个地方以适应我们的中文环境。由于与本教程无关,这里对于Flash的操作不多说什么。先修改“square2”中的“txt”动态文本框的属性,将字体修改为“宋体”,大小为12,然后将反锯齿功能关闭。如图三。

    图三

    之后修改“listbut2”中的“btn   _txt”动态文本框,同样将字体修改为“宋体”,大小为12,然后将反锯齿功能关闭。如图四。

    图四

    最后点F9打开AS编辑器,这里有两个地方可以修改,也可以不修改。
    第一个地方是对于xml文件名的定义,如图五,可以把“mp3player.xml”修改成你喜欢的文件名,但扩展名应该保持xml。

    图五

    第二个地方是关于版权信息的,当然建议保持原来的,如果你不想让这个Flash MP3 Player上出现别人的信息也可以修改掉。如图六

    图六

    Flash文件的修改到这里就告一段落了,现在让我们来修改xml文件。

    我的xml文件如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <player showDisplay="yes" showPlaylist="yes" autoStart="random">
        <song path="http://res.eool.net/wish.mp3" title="I WiSH-明日への扉" />
        <song path="http://res.eool.net/minamikaze.mp3" title="Shimokawa Mikuni-Minamikaze" />
        <song path="http://res.eool.net/edd1.mp3" title="Jason Wade-You Belong to Me" />
        <song path="http://res.eool.net/01.mp3" title="Naoki Sato-Synchro BOM-BA-YE" />
        <song path="http://res.eool.net/s.mp3" title="阿桑-一直很安静" />
        <song path="http://res.eool.net/asang.mp3" title="阿桑-寂寞在唱歌" />
        <song path="http://res.eool.net/02.mp3" title="Yuki-Dramatic" />
    </player>


    第二行showDisplay="yes" showPlaylist="yes" autoStart="random"其实是三个参数。第一个参数showDisplay是选择是否显示顶部的效果;第二个参数showPlaylist是选择是否显示播放列表;第三个参数autoStart是选择是否自动播放如何自动播放。第一个、第二个和第三个参数的可选项均为“yes”或者是“no”,含义很明显,不解释。第三个参数可以使用“random”作为参数的传递值,作用是随机播放任意一个音乐文件。
    从第三行开始就是音乐文件的定义了。其中path定义的是MP3的文件地址。你可以从sogua等网站找到需要的MP3文件的地址。请初涉网络的朋友注意不要使用“c:\music.mp3”这样的硬盘地址……呵呵。后边的title定义的是在播放列表中的显示名字。

    做好以上两个文件的准备工作后就要进入正题了。要找到一个能够储存文件的空间来存放这两个文件。将这两个文件存在同一个目录下,然后将mp3player.swf修改扩展名为mp3player.wmv,之后将MSN Spaces的Windows Media Player的URL定义修改到这个wmv文件就可以正常工作了。不过这个找空间是一个比较麻烦的事情咯…各位自己努力吧。最后送上我已经修改好了的swf文件和xml文件,其中swf文件可以修改扩展名直接用,xml文件请自己编辑自己的音乐列表。

    点击下载

     

    补记:有人提醒如果Windows Media Player如果在旁边就会显示不全。所以特制作了一个小版本的播放器。170像素宽度版本播放器点击下载

     

     

    文章来源于:Eddie 原创教程 + 胡扯八道

    Comments (1)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Picture of Anonymous
    June wrote:
    开往春天的手扶拖拉机.
    对面的保安看过来.

    够强.厚厚.
    Sept. 8

    Trackbacks

    Weblogs that reference this entry
    • None