AS3: Playr

Ronny Welter, a Flash developer from Belgium, just released version 2 of Playr for AS3. In his own words:

Playr is a open source Flash Actionscript 3 class which takes the heavy lifting off your hands and makes building any kind of music player a piece of cake.

I took a quick look over the docs and there seems to be some really cool stuff there. There are some things missing, however, that are available in my SoundManager which will keep me from using this on a regular basis. I would also like to see the duration of the songs be loaded from the mp3 files themselves, not set in a playlist as seconds (at least that’s what I assumed from my quick glance over it). That being said, it is a very cool and convenient way to quickly load and play mp3s. I urge you to check it out.

If you found this post useful, please consider leaving a comment, subscribing to the feed, or making a small donation.

8 Comments

Ronny is from belgium.

It’s some really cool shit indeed 🙂

In my opinion it has everything one needs to create a player, which functions would you add ?

The total time of the track is loaded automatically, but is only available after a track is fully loaded ( I think :p ).

Nice site 🙂

Hi,

Thanks for your kind words!

But I am from Belgium indeed 🙂

Quick note on the ‘duration’. Getting the track length from the ID3 information itself is a bit tricky. It only reflects the time available to play.
For example: If a track originally is 200 seconds, but it’s only loaded 50%, the ID3.LEN value will return 100 instead of 200.
That’s why I’m doing it using the playlist.php script.
I will however add a handler to get the length when the song is completely loaded 🙂
If you have a better suggestion, feel free to get back at me via email 😉

Take care

Thanks for the fix. I thought I saw .de somewhere in the URL, maybe it was .be (in one of his URLs at least).

@Ronny,
Steven Sacks has a pretty good way of calculating the duration of an mp3 that you can read about here:

http://www.stevensacks.net/2008/12/02/calculating-duration-on-mp3s-in-as3

@Dust,
Some of the things missing are adding library sounds (i know this is meant for external playing though, which is the difference between this and my SoundManager), and really without rewriting all this stuff here, just take a look at my SoundManager to see some differences. This is not to take away from this in the very least, however, they both server different purposes. Ronny has done a great job with Playr and it is definitely useful for many instances. Heck, I will use it when I need to do the stuff that Playr was made to do, I just can’t use it ALL the time because it doesn’t always handle some things (like playing sounds from the library).

I should also add that my SoundManager is in no way perfect, either. It is lacking some functionality that I’ve been wanting to add for a while now just haven’t had the time (read: lazy) to do it.

Nevertheless, it is a great class and has tons of great options. Great for getting off the ground running with playing music.

Thanks for the explenation Matt 🙂
The ability to play internal library sounds may be interesting indeed, I agree on that.

Good luck finishing your SoundManager class 😉

Thanks for the links, Matt! I’ll look into it. Might just be another item on my ‘update list’ 😀

Thx for the kind words, again.

no problem Ronny, hope to see Playr evolve into a great little class (library?).

Leave a comment

(required)

(required)