Flash Tutorials - Herong's Tutorial Examples - Version 3.02, by Dr. Herong Yang
Integrating "mp3player" in Web Pages
This section provides a tutorial example on how to integrate mp3player into your own Web pages, using a configuration file and a skin file.
Once I downloaded mp3player, I want to try to integrate it into my Web pages. Here is how I did it by following the sample code provided in template page displayed in the previous section.
1. Copy these files from the downloaded ZIP folder to my Web page location:
copy .\template_maxi\player_mp3_maxi.swf . copy .\template_maxi\test.mp3 Music_Sample.mp3 copy .\template_maxi\skin001.jpg mp3player_skin.jpg copy .\template_maxi\config.txt mp3player_config.txt
2. Edit the configuration file, mp3player_config.txt:
skin=mp3player_skin.jpg width=200 height=20 sliderwidth=20 sliderheight=10 buttonwidth=25 showvolume=1 showstop=1 showinfo=1
3. Create a testing HTML file, mp3player_test.html:
<html><body> <!-- mp3player_test.html - Copyright (c) 2014, HerongYang.com, All Rights Reserved. --> <p>Testing mp3player:</p> <object type="application/x-shockwave-flash" data="player_mp3_maxi.swf" width="200" height="20"> <param name="wmode" value="transparent"/> <param name="movie" value="player_mp3_maxi.swf"/> <param name="FlashVars" value="mp3=Music_Sample.mp3&config=mp3player_config.txt"/> </object> </body></html>
If you open mp3player_test.html in Firefox, you should see mp3player control panel display. Click the play button, a piece of music will be played. By the way, I have replaced the original French song in test.mp3 to a nice short music.
I have included the above code here on this page. If you are reading the Web version of this book, you should be able to see mp3player displayed and you can play it. Otherwise, you will see a static image.
Flash application my3player is integrated here for you try:
Last update: 2014.
Table of Contents