Playr

Playr. Hands down the easiest way to play music in Flash Actionscript 3.

Frontpage news

Demos of how it is done

Demos

How to use the Playr class

Tutorials
Download

Example sources available!

January 20th, 2009

Many people have asked me when I would release the source for the 2 examples listed in the demos section. I should’ve uploaded those right away but somehow I just postponed it… Anyway: here they are!

As always: feel free to suggest new features, or report bugs.
Good luck and enjoy!

Have your say

Bertus

I am preety new to Flex and I can’t figure out what I do wrong?

I got the source and the Playr2.0.zip
I paste the code in my project and the files of the zip in the lib directory.

And now I get errors on:
“Type niet gevonden of geen constante bij compilatie. PlayrErrorEvent.”
en
“Type niet gevonden of geen constante bij compilatie. PlayrEvent.”

The playr object works fine (at least I see the functions when I do playr. )
What am I doing wrong?

Ronny

Mail me your complete Flex project ;) is there an import rule like

‘import com.nocreativity.playr.PlayrEvent’
and
‘import com.nocreativity.playr.PlayrErrorEvent;’
?

Those should be there :)

michael

I’m trying to use this player in Flash CS4 and everything works great except for the progress property in the PlayrEvent and the totalSeconds property on Playr itself. The audio plays fine but when i try to trace either of those variables, i get 0. Any ideas?

Andy

I have spent most of my time with animation only and Flash, so I am having a bit of trouble figuring out how to get started with this. If it would be possible to do a short step-by-step tutorial on how to use the singleTrack.mxml file, I would really, really appreciate it. I’m sure it’s annoying to have to walk people through, but I’m trying to learn.

Ronny

Hi Andy,
sorry for the late reply.

I was planning on making a few screencasts to get you up and running.

I’ll try to get those online in a couple of days… I can’t promise anything right now, though.

I’ll keep you posted :)

Leandro de Oliveira

Hi, great job!! the library is very nice.

I found a small bug on file Player.as the function

private function handlePreviousButtonClick(e:MouseEvent):void{
stop();
}

replace for

private function handlePreviousButtonClick(e:MouseEvent):void{
previous();
}

Thanks.

sami

hi

great player - one weird thing - the volume VSlider “sliVolume” starts going up automatically… in the fullBlown app MXML code - tried this in FF3 and IE6 both :S

Ronny

Heh, that’s not a bug. It’s a feature ;) it’s the fadeIn() method kicking in. All part of the demo ;) Perhaps I should’ve mentioned that earlier

damjan

hi

this is an amazing script. thanks!

is it possible to load a new playlist later on, replacing the first playlist that was loaded? I am having problems making this work - this would be nice to have to be able to load in different section of a site, for example, or if loading dynamically different playlists for different CDs for example.

Many thanks!

damjan

Ronny

I should check it out. I think that should be working though. As far as I can remember the playlist engine is built to support this.

Just create a new playlist, add tracks to it, and then do
playr.playlist = myNewPlaylist;

Good luck ;)

damjan

Thanks, Ronny! This worked fine. Do you think it is easily possible to load an entire new XML file while still using the class functions? If I try this by simply doing playr.loadPlaylist(xmlURL); it loads the first XML again over the other one, so you hear the same audio above the other one (basically duplicating the player).

much appreciated

tLAMA

hi. can’t find out how to seek through the track.

any hint?

Leave a Reply