This code is meant for pls files but could easily be adapted for m3u. no benefit I can see in doing that though compared to pls.
-----
So for a little personal project I'm doing in flash I'm building an mp3 player.
Playing mp3's with flash is pretty easy and and making some buttons with play pause etc is also not really an issue. But loading a playlist file... well now we have a problem.
Most people seem to want to just creat an xml file becuase flash does that easily. But that seems like a little lazyness at the start and alot of tedious work down the road creating xml files all the time. I'd rather not have all that extra work later on and I'd rather have native support of .pls files for playing music.
I googled and couldn't find anyone who got this running except some guy, ming chan with m3u years ago, but the source is since gone and disapeared. So for anyone who's also stuck, please feel free to use my actionscript code, but if you improve it (It's messy I know...) please post in the comments.
Anyways here's the source code for parsing a .pls file in actionscript2.
It's pretty raw and brute force, but it works just fine. You have 2 string arrays at the end, one with the file location and one with the id3 name. unfortunetly track time isn't in a .pls file (it's also not in an m3u either) so you have to read that on your own with another function. ...maybe I'll post that after I write it.
(126) Total entries in journal
// Finland 2003
"That was when I realized. I asked myself could some of what these people be talking about actually be dangerous? And the best thing I can do is stay close to them, track what they are interested in and either hack it or try to confuse the spaces in which they operate". - Rob Van Kranenburg