About Flash Video
MP3 is just as common on the web nowadays as JPEG. There are tons on browser plugins – Quicktime and Windows Media Player among others.
A flash player has a distinct advantage: works on all platforms (no need to worry about Linux users). On top of that, our player is very small, very easy to modify and free.
Mini FLV Player features
- Very small size, just 4Kb including graphics;
- Clean AS code that can be easily turned into a class or component;
- flexible, easy to use, easy to extend, easy to integrate in an existing project – for example adding a playlist is a 5 minute job;
- simple API:
playFile(),pause(),rewind()andsetSize(); - simple and stylish interface;
- can be used as a standaone player with the file to be played set from the html container;
- The “skin” can be easily edited;
- Support for ID3 tags with scrolling text;
- It’s free for both commercial and non-commercial purposes. As a matter of courtesy, please include a link to this site.
Using it
If you don’t want to bother with editing the flash file, all you have to do is to pass the required parameters to the flash movie. The easiest way to do this is by using the SWFObject library included with it. Just have a look at the html source code. You’ll see this:
<div id="flashcontent">Place alternate text for users who don't have Flash</div>
<script type="text/javascript">
var so = new SWFObject("player.swf", "mp3player", "300", "32", "8", "#ffffff");
so.addVariable("file", "sample.mp3");
so.write("flashcontent");
</script>Replace sample.mp3 with name and path of the file you want to load.
You can change the width of the player from 300 to some other value (changing the height has no effect) and also the background color to match the page background.
Download
Get the full source code, pre-compiled player and a sample sound.
Mini MP3 Player v1.0 for Flash 8 (19.6 KiB, 530 hits)