开发者

how to embed audio in flex 3?

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 ea开发者_StackOverflow中文版ch image, one sound should come in background. Any ideas? thanks in advance


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


The official documentation created by Adobe is quite ok.. you can find the link here. You will also find code samples.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜