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&amp;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:

Table of Contents

 About This Book

 Introduction of Adobe Flash

 Adobe Flash Player Plugin for Firefox

 Adobe Flash Player Plugin for Chrome

 Adobe Flash Player Plugin for Safari

 Adobe Flash Player ActiveX for IE

 Using "object" Elements for Flash Files

 Using "embed" Elements for Flash Files

"mp3player" - MP3 Music Player

 Downloading and Testing "mp3player"

Integrating "mp3player" in Web Pages

 "mp3player" Configuration Parameters

 "mp3player" Controlled by JavaScript Code

 "object" Element with Flash Parameters

 "object" Element with Flash Parameters - Firefox 3

 "object" Element with Flash Parameters - IE 8

 "embed" Element with Flash Parameters

 SWFObject - Hidding "object" behind JavaScript

 Flash Player Projector

 SWFTools - SWF File Manipulation Tools

 SWFC Script to Generate Flash SWF Files

 ActionScript Embedded in SWFC Script

 AS3Compile - ActionScript 3 Compiler

 Adobe Flex SDK 4

 SWF File Structure and Tags

 SWF File Processing Rules

 SWF Files for Video and Audio Streams

 Outdated Tutorials

 References

 Full Version in PDF/EPUB