Sound Class, load bytes of MP3


My player is requesting an audio by calling a database query. As a reply I get the actual raw data of that MP3, I get bytes back and not a path as there is no path, the MP3s are actually uploaded inside the database (don’t know how…)

So, I’m not loading the data with Sound.load(URLRequest), instead I’m getting it as an Event.COMPLETE. I try to grab those bytes into a Sound() object and play them; It’s impossible.

Here is a post from 2007 saying:
The method i used involves loading data with URLStream (as it loads chunks of data instead of witing for all data like Loader or URLLoader), creating valid swf byte code (in this case the byte code of a swf with a library item exported as a soundclass). after that, load this swf bytecode into a Loader, extract the soundclass with getDefinition and get it to play !

How exactly should I do it too, and is this the solution ?