views:

283

answers:

1

Is it possible to play an embedded AAC file in Flash/Flex somehow? I know you can playback embedded MP3 files, but I hear that you can't do that with AAC. Anyone know any sneaky ways to get around this?

By way of illustration, here's come code.

[Embed(source='../../audio/music02.m4a', mimeType="audio/aac")]
private static const __ExampleMp4File:Class;
public var myMp4Sound:Sound = new __ExampleMp4File();

public function EmbeddedAudioTest()
{
  myMp4Sound.play();
}
+1  A: 

Unfortunately you can't. If you convert the audio file to video with just an audio track, then you can play it.

This does seem like a silly oversight in the player since it has support for playing embedded sound and support for AAC embedded in video.

Sam
Oh, so you _can_ play [Embed]-ed video files?! That sounds like a compromise I'm very willing to make. Can you post code to illustrate?
aaaidan
Hey Sam, just a wee nudge ... you can/can't play embedded video files?
aaaidan
@aaaidan, yes, you can `[Embed]` a video and play it.
Sam