Question

I am currently using mp3 files in an application but have been told that I should be using smaller m4a files. When I attempt to connect an m4a file with my existing Sound object, the sound fails to play. I've been scouring the web for sample code but cannot find any examples that illustrate how to play an m4a file. My questions: 1. Can I play an m4a file in FB? 2. Can anyone show me a code clip that illustrates how to play an m4a file in FB? Thank you!

Was it helpful?

Solution 2

The answer above is a big help, but the full answer to the question is available here:

OTHER TIPS

Yes, you can play AAC audio in Flash Player if it's encoded in an MPEG-4 container.

More info here: http://www.adobe.com/devnet/flashplayer/articles/hd_video_flash_player.html

Audio files encoded in an MPEG-4 container can now be used in Flash Player if they use the AAC (Advanced Audio Coding) codec. The AAC codec is a lossy compression scheme for audio that has been used since MPEG-2, but has been updated for MPEG-4.... Now you can take advantage of this file format through Flash Player by bringing in MPEG-4 files with AAC encoded audio.

From the section "Using ActionScript to play AAC files" ...

var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);
stream_ns.play("RE-Sample.m4a");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top