Nick Van der Vrekens blog & portfolio

Playr, the best actionscript music player out there

December 18th, 2008

Actionscript, Flash, Links, Noteworthy, XML

Playr is an open source Flash Actionscript 3 class which takes the heavy lifting off your hands and makes the building of any kind of music player a piece of cake. Yes! Thats the short description right there.

If you need a music player in your site, this is what you need. Playr makes it incredible easy to implement any kind of music player in your flash website. And the best part of it, you only need two (2!) lines of actionscript to get it working.
For all you hard asses that don’t believe me, here’s an example:

1
2
import com.nocreativity.playr.Playr;
var playr:Playr= new Playr("/assets/playlist.xml","/assets/music/",true);

Or a bit more advanced:

1
2
3
4
5
6
7
8
9
10
11
import com.nocreativity.playr.*;
var playr:Playr= new Playr("/assets/playlist.xml","/assets/music/",true);
playr.registerPlayButton(btnPlay);
playr.registerPauseButton(btnPause);
playr.registerNextButton(btnNext);
playr.registerPreviousButton(btnPrevious);
playr.registerStopButton(btnStop);
playr.addEventListener(PlayrErrorEvent.PLAYLIST_STREAM_ERROR, playlistStreamErrorHandler);
playr.addEventListener(PlayrErrorEvent.SOUND_STREAM_ERROR, soundStreamErrorHandler);
playr.addEventListener(PlayrErrorEvent.PLAYLIST_INVALID_XML, playlistInvalidXMLErrorHandler);
playr.addEventListener(PlayrErrorEvent.TRACK_NOT_ADDED_TO_PLAYLIST, trackNotAddedToPlaylistErrorHandler);

You can download Playr and see more information and examples at playr.nocreativity.com.
The Playr documentation is available at playr.nocreativity.com/docs/

Playr has been developed by the local Flashguru, Ronny Welter .
No animals were hurt or killed during the development of Playr. Ronny had a headache tho.

Subscribe for updates

Leave us your name and email adress and we'll inform you when someone posts a new comment. unsubscribe?




There are no replies to this item:




XHTML:Please use "<pre>" to insert code: <pre lang="actionscript asp css html4strict javascript php sql xml[pick any of these languages]" line="45[starting line, optional]"> your code here </pre>

Be the first to write a reply !