Adobe AIR for iPhone 应用程序:无法正常播放音频
我刚刚使用adobe air开发了一个应用程序。它包含一些带有mp3 格式背景音乐的动画。问题是动画播放时音乐很生涩…… 仅供参考,这是我在 flash 中播放音频的方式:new Sound(new URLRequest("m3.mp3")).play()
我做错了什么吗?
顺便说一句,有趣的是,如果你点击主页按钮,然后再次返回应用程序,一切都会播放得很漂亮......
I just developed an App by using adobe air. It contains some animations with background music in mp3 format. The problem is that the music is very jerky when the animation is playing...
FYI, this is the way how I play audio in flash:new Sound(new URLRequest("m3.mp3")).play()
Have I done anything wrong?
BTW, the funny thing is that if you hit the HOME button, and then come back to the app again, everything plays beautifully...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在不了解更多代码的情况下,声音似乎没有完全加载。文件会尽可能播放,然后等待更多数据显示,然后继续。 。 。非常生涩。您可能需要等待声音完全加载才能播放:
此代码来自 Adobe 的声音文档。
Without knowing more about the code, it seems like the sound is not fully loaded. The file plays as far as it can, then waits for more data to show up, then continues . . . very jerky. You may have to wait for the sound to load completely before playing it:
This code is from Adobe's Sound docs.