Good day and thanks a lot for your fantabioulous job! Wish you all the best really.
And my question...
I can load online Mp3 files and control them using mp3Loader class (Play/pause/....):
var snd:MP3Loader = new MP3Loader(_sndURL, { name: "myMp3", autoPlay: true, onOpen: doOpen, onProgress: doProgress, onComplete: doComplete, onError: doError, onFail: doError} );
snd.load();
But how can I access to the binary Mp3 data that are loaded?
(to save them in ByteArray and then use fileStream to writeBytes on disk)
When I try something like this :
function doComplete(event:LoaderEvent):void {
var ba:ByteArray = snd.content;
}
I get an Error that makes sense:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.media::Sound@61d3021 to flash.utils.ByteArray.
Also if I use dataLoader, then I can not have control over Mp3 playback (i.e autoPlay).
So What should I do?
- to could download Mp3 files and play them with Mp3Loader class
- and also have access to its binary data to could save it on Disk ??
Thanks a lot,
Ali