Esseti
February 16th, 2010, 11:38 AM
Is it possible for Flash to output a *.mp3 file of a Sound Object?
theCodeBot
February 16th, 2010, 10:35 PM
Theoretically speaking, yes. Realistically, not so easily.
The way you do this with JPEG's and other images is to place the raw data into a ByteArray, send that ByteArray through an encoder class, and then send the fixed data off to a server with PHP on it, which is then allowed to save files (Flash is not able to directly save a flash file to your computer unless it's through the AIR runtime, which is much more complex).
However, with MP3's, you're dealing with a more complicated, and more proprietary, format. Everything else would remain the same, but actually getting the file into the right format would be a lot harder. This means that in order to transcode it from the raw, you'll need to do so on the server side, as there are no AS3 utilities (that I know of) which can do it. You need to compress it in the MP3 way, write ID3 tags, and a slew of other operations to make a proper MP3 file. Then again, the builtin Sound class handles MP3's pretty competently on its own, so it could be possible for all I know.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.