I am using the following code from the Adobe ActionScript guide (Programming ActionScript 3.0 for Flex):
package {
import flash.display.Sprite;
import flash.media.Sound;
import flash.media.SoundChannel;
public class EmbeddedSoundExample extends Sprite {
[Embed(source="smallSound.mp3")]
public var soundClass:Class;
public function EmbeddedSoundExample() {
var smallSound:Sound = new soundClass() as Sound;
smallSound.play();
}
}
}
The resulting swf refuses to play, tested on two different machines with two different operating systems (one WinXP desktop, one Zenwalk laptop).
Does anyone have a better example of embedding mp3s using Flex SDK (i.e. not FlashBuilder or CSx).
Thanks