Loading/Playing mp3s without round-tripping to the server

One of the cool new features of Flash Player 10 is that you can load files from the client without uploading them to the server.
The only limitation is that you`ll only be able to access the raw bytes of the file and there is no way to find out the filepath (see problem discussion here). The problem is that until now we cannot pass mp3 bytes to the sound object or the netstream class so there is no easy way to play mp3s locally on the client (without first uploading them to the server).
So here is a solution that uses the old trick of generating a SWF file in memory which contains the mp3 associated with a linkageId.

Check out my solution here
bild-7Note that some mp3s might not work as the Mp3Reader class is not very optimized but it should show the general steps to chieve the goal.
Let me know if it`s useful and if you could make any enhancements.

Next we`ll look into how to load two mp3s and mix them and save them as a wav (PCM) file.

Thanks Adobe! I`m now a community expert :-)

I got a nice surprise in my email and i`m really honored to be a Adobe community expert now!

Developer Logo
While i`m not yet sure what this really means i`m know it means i should kick my ass and get this blog running again.
I was really lazy with posting here the last months because of a lack of time and the frustration of this blog being hacked.
However i`ll do my best to post a bit more in the coming months.