0%

WsEĐăng nhậpĐăng ký
Chuyển points

Go downThông điệp [Trang 1 trong tổng số 1 trang]

© FMvi.vn

Fri May 06, 2011 2:25 pm
ƃuàoɥ˙ɹ˙ɯ
ƃuàoɥ˙ɹ˙ɯ

๖ۣۜRồng๖ۣۜbất๖ۣۜTử

Bạn hãy tải các file sau về máy:
[url=http://thongthaibm.googlepages.com/mp3player.swf]http://thongthaibm.googlepages.com/mp3player.swf[/url]
[url=http://thongthaibm.googlepages.com/playlist.xml]http://thongthaibm.googlepages.com/playlist.xml[/url]
[url=http://thongthaibm.googlepages.com/config.xml]http://thongthaibm.googlepages.com/config.xml[/url]
[url=http://thongthaibm.googlepages.com/bg.gif]http://thongthaibm.googlepages.com/bg.gif[/url]
Mở file playlist.xml bằng notepad hay bất kỳ chương trình soạn văn bản nào cũng được, bạn sẽ thấy nó có dạng như sau:

Trích:


<?xml version="1.0" encoding="UTF-8" ?><playlist version="1" xmlns="http://xspf.org/ns/0/">

<title>by mr.Dream</title>
<info>http://www.jeroenwijering.com/?item=Flash_MP3_Player</info>

<trackList>

<track>
<annotation>Ánh trăng vàng</annotation>
<location>http://files18.nhac8.com/3764823648723648763247/sv5/AnhTrangVang-BangCuong-Nhac8com.mp3</location>
</track>

<track>
<annotation>Step up</annotation>
<location>http://files18.nhac8.com/3764823648723648763247/en3/StepUp-DarinZanyar-Nhac8com.mp3</location>
</track>

</trackList>
</playlist>
Nếu muốn thêm bài hát bạn chỉ cần thêm đoạn mã sau vào giữa 2 thẻ <tracklist> và </tracklist>
Trích:


<track>
<annotation> tên bài hát</annotation>
<location>link đến bài hát</location>
</track>
Ví dụ nhé , mình sẽ thêm các bài hát từ trang web : [url=http://www.nhac8.com/]www.nhac8.com[/url]
Trích:


<?xml version="1.0" encoding="UTF-8" ?><playlist version="1" xmlns="http://xspf.org/ns/0/">

<title>by mr.Dream</title>
<info>http://www.jeroenwijering.com/?item=Flash_MP3_Player</info>

<trackList>

<track>
<annotation>Ánh trăng vàng </annotation>
<location>http://files18.nhac8.com/3764823648723648763247/sv5/AnhTrangVang-BangCuong-Nhac8com.mp3</location>
</track>

<track>
<annotation>Step up</annotation>
<location>http://files18.nhac8.com/3764823648723648763247/en3/StepUp-DarinZanyar-Nhac8com.mp3</location>
</track>

<track>
<annotation>Cây lá và gió </annotation>
<location>http://files18.nhac8.com/3764823648723648763247/sv5/CayLaVaGio_Demo-KhongTuQuynh_ThienMinh-Nhac8com.mp3</location>
</track>

</trackList>
</playlist
Save lại .
Bạn mở file config.xml
Trích:


<mp3config>

<!-- choose here if you want the mp3player to automatically start and shuffle songs (true or false) -->
<autostart>true</autostart>
<shuffle>false</shuffle>

<!-- choose the mp3player repeat mode (none, one, all or list (plays the entire playlist once)) -->
<repeat>list</repeat>

<!-- choose the mp3player volume (0 to 100) -->
<volume>100</volume>

<!-- choose here if you want to show the display and playlist (true or false) -->
<showdisplay>true</showdisplay>
<showplaylist>true</showplaylist>


<!-- choose here in what frame you want links to be opened (_blank, _self, _top or a framename) -->
<linktarget>_blank</linktarget>

<!-- choose the mp3player colors (hexadecimal, from 0x000000 to 0xffffff) -->
<backcolor>0xffffff</backcolor>
<frontcolor>0x000000</frontcolor>
<lightcolor>0xC7EF65</lightcolor>

<!-- you can set a JPG as the background here to skin the mp3player (url to the jpg file) -->
<jpgfile>http://thongthaibm.googlepages.com/bg.jpg</jpgfile>


<!-- (for webmasters) URL of a script, called on start and completion of a song -->
<!-- the following vars are sent with POST: title, file, identifier, action ('start' or 'complete') -->
<callback></callback>


</mp3config>
Trong file đã có chú thích rất rõ rang.
+ thẻ <autostart></autostart> cho phép MP3 player tự chạy khi mở web hay không
<autostart>true</autostart> thì sẽ tự động chạy.
<autostart>fail</autostart> thì sẽ không tự động chạy
+thẻ <shuffle></shuffle> : Cho phép chuyển bài ngẫu nhiên.
<shuffle>true</shuffle> : Chuyển bài hát ngẫu nhiên
<shuffle>false</shuffle> : Chuyển bài hát theo thứ tự từ trên xuống
+2 thẻ
<showdisplay> </showdisplay> : Có hiện MP3 player hay không.
<showplaylist></showplaylist> : Có hiện list các bài hát không.
+ thẻ <jpgfile> </jpgfile> hình nền cho MP3 player. Các bạn đặt link đến hình vào giữa 2 thẻ trên.

Ví Dụ :
Trích:


<jpgfile>http://files.myopera.com/wishingstar_0305/Pic/BG2.jpg</jpgfile>
Các thẻ khác các bạn không cần quan tâm. Ai muốn tìm hiểu thêm thì hỏi trong Box này nhé
Công việc cuối cùng là save lại và upload lên một cái host nào đó. Nhớ là các file mp3player.swf ; playlist.xml và config.xml các bạn phải up lên cùng một host còn các file nhạc thì không cần. Chèn đoan mã sau vào bài viết của các bạn.

Trích:


<p align="center"><embed name="index1" pluginspage=
"http://www.macromedia.com/go/getflashplayer" src="
< link đến file mp3player.swf>" width="258" height="318"
type="application/x-shockwave-flash" border="0" wmode=
"transparent" flashvars="&config=<link đến file config.xml>&file=
<link đến file playlist.xml>" allowScriptAccess="never" quality="high"
menu="false" vspace="5" hspace="5"></embed><p>
Các bạn có thể tự tạo cho mình các file playlist và config bằng cách down các file sau về máy
List file cần download :
[url=http://files.myopera.com/wishingstar...MP3_Player.hta]http://files.myopera.com/wishingstar...MP3_Player.hta[/url]
[url=http://files.myopera.com/wishingstar...MP3_Player.hta]http://files.myopera.com/wishingstar...MP3_Player.hta[/url]
file create_MP3_Player.hta dùng để tạo code để chèn vào blog. Nó có phần dành cho file cấu hình Mp3 player. VD: hình nền,....
Trong 360* của Yahoo bạn phải bấm vào cái ô vuông kế nút View HTML Source trước khi cho đoạn code vào bài viết nha, xong rùi bấm vào nó một lần nữa(chú ý nhớ phải ghi thêm vài chữ nữa nha chứ hông thì nó hổng có hiện đâu
Nên nhớ bạn cần phải tạo file cấu hình nha, không có chạy kg được đâu á!

file createPlaylist_for_MP3_Player.hta dùng để tạo file playlist cho mp3 player.
Các bạn coppy các đoạn code sau đó dùng notepad để save lại thành các file playlist.xml và config.xml. Nhớ là ở phần Endcoding phải chọn UTF-8 nha.
CHúc các bạn thành công !
https://camxucfan9x.forumvi.com

Thích

Báo xấu [0]

Gửi một bình luận lên tường nhà ƃuàoɥ˙ɹ˙ɯ
Trả lời nhanh

Về Đầu TrangThông điệp [Trang 1 trong tổng số 1 trang]

© FMvi.vn



Cách tạo List nhạc cho Web riêng mình

« Xem bài trước | Xem bài kế tiếp »

Bài viết liên quan

    Quyền hạn của bạn:

    Bạn không có quyền trả lời bài viết