I am using Flashdevelop with flare3d and Flex sdk. When I try to embed an mp3 sound file and play it, I get an error: Error: unable to resolve 'sound.mp3' for transcoding
and Error: Unable to transcode sound.mp3
.
I searched around and most answers suggest saving the mp3 file forrmat with 44100 HZ sampling rate. The file is in the same folder as the compiled swf. Here is the code:
[Embed(source = "sound.mp3")] private var Sound:Class;
private var sound:Sound = new Sound();
private var soundChannel:SoundChannel;
sound.addEventListener(Event.COMPLETE, onSoundLoadComplete);
function onSoundLoadComplete(e:Event):void{
soundChannel = sound.play();
}