问题
i want to play a sound when user click on the button in flex 3. My flex application will generate the images one by one. For each image, one sound should come in background. Any ideas? thanks in advance
回答1:
You should be able to write something like this:
[Embed(source="myfile.mp3")]
[Bindable] //Not required. Just an example of using multiple meta tags.
public var soundCls:Class;
This will give you the ability to reference the file via the class name
回答2:
The official documentation created by Adobe is quite ok.. you can find the link here. You will also find code samples.
来源:https://stackoverflow.com/questions/4276485/how-to-embed-audio-in-flex-3