swf 流媒体音频播放器
我是 Flex 新手。谁能给我指点一小段播放音频文件(mp3、wav...)的 mxml 代码,它还具有暂停、播放、停止...音频文件的功能。
此文件稍后也会嵌入到 html 文件中。
i am New to flex.Can any one point me to a small piece of mxml code which plays audio files(mp3,wav.....) also which has the capabilities to pause, play, stop.... the audio file.
Also this file would be embedded in a html file later on..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以自己编写代码。如果您是 Flex 新手,这将是一个很好的实践:)
对于 mp3 处理,请查看 Sound 类和相关类,例如 SoundChannel 类。文档应该有一些关于如何实现它们的示例,并且由于您使用的是 Flex,因此 UI 组件应该相当简单。
现在,如果您需要将其嵌入到 HTML 文件中,则必须生成一个 swf,在这种情况下 Flex 就有点大材小用了!您应该看看在 Actionscript 中执行此操作,生成的 swf 会轻得多。
最后,如果您懒得自己编写代码,那么那里有很多 MP3 播放器!
You could code that yourself. If you're new to Flex, it would be good practice :)
For the mp3 handling look at the Sound class and related classes such as the SoundChannel class. The docs should have some examples on how to implement them, and since you're using Flex the UI components should be fairly straightforward.
Now , if you need to embed that in an HTML file, you'd have to produce a swf, in which case Flex is a bit overkill! You should look at doing this in Actionscript, the resulting swf will be much lighter.
Finally, if you can't be bothered to code this yourself, there are plenty of mp3 players out there!