how to embed audio in flex 3?

浪子不回头ぞ 提交于 2019-12-11 16:16:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!