在单个 swf 对象中播放多个 flv 文件
我的网站中有一个 swf 对象。
我必须从数据库中读取数据,在获取视频名称数据后,
我需要在单个 swf 对象中逐个播放这些视频,这意味着第一个视频完成后第二个视频将开始。
提前致谢。
I have one swf object in my site.
I have to read data from database and after fetching data of video names,
I need to play those video in single swf object one by one, means after completion of first video second video will start.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
假设您使用的是 NetStream,则必须监听 NetStream onPlayStatus 事件,然后使用 play(...) 方法
Assuming you are using NetStream, you have to listen to NetStream onPlayStatus event and then load another flv with the play(...) method
Lee Brimelow 这里有一个关于在 AS3 中构建您自己的视频播放器的教程,这应该有助于您入门 - 尽管从您谈论它的方式我感觉到您并不是真正的 Flash 开发人员,您只是在这个项目中使用 flash - 所以你所要求的可能比你预期的要复杂一些。
首先观看这个:
http://gotoandlearn.com/play?id=46
然后了解当你构建一个播放器时,它会在某些时间触发某些“事件”。就像上面的 Kajyr 所说,您需要监听一个特定事件,告诉您当前剪辑已经结束。当它触发时,您必须告诉您的播放器播放下一个剪辑。
如果您了解其背后的基础知识,您所要求的是完全可能的,甚至很容易。我在以前的工作中构建了一个处理动态播放列表等的工具,只花了大约一天的时间就给了它我们需要的所有功能。但您确实需要了解 AS3 的工作原理才能使其发挥作用。
或者,您可以在 http://activeden.net/ 找到某种视频排序应用程序 - 他们有许多预先构建的闪存组件,这是另一种方法。
Lee Brimelow has a tutorial here for building your own video player in AS3, this should help to get you started - though from the way you're talking about it I get the sense that you're not really a flash developer, you just have to work with flash for this project - so what you're asking for may be a little more complex than you expect.
First watch this:
http://gotoandlearn.com/play?id=46
Then understand that when you build a player it fires certain "events" at certain times. Like kajyr above says, you need to listen for a specific event that tells you that the current clip is over. When that even fires, you have to tell your player to play the next clip.
What you're asking for is entirely possible and even easy if you understand the basics behind it. I built a tool that handles dynamic playlisting etc at my old job and it only took about a day to give it every feature we needed. But you do need to understand how AS3 works in order to make this work.
Alternately you may be able to find some sort of video sequencing app at http://activeden.net/ - they have a lot of pre-built flash components and that's another way to go.
只需我们可以为此创建一个播放列表...
一些谷歌搜索可以帮助我做到这一点。
看看这个
Simply we can create a playlist for that...
Some googeling helps me for this.
check out this