以后无法使用 swfobject 更改 flash 文件
我使用 swfobject 来加载 youtube 嵌入视频,它工作得很好,但是当我尝试在特定时间后加载另一个 youtube 视频时,它不起作用,看起来容器 div 完全被 swf 替换,而不是把它放在里面它。
注意:我尝试使用 swfobject.embedSWF(path,divID,width,height) 加载其他不起作用的视频。
有什么想法吗?
I use swfobject to load a youtube embedded video, it works nice, but when i try to load another youtube video after a specific time it doesn't work, It looks like the container div is totally replaced with the swf instead of putting it inside it.
Note: i attempt using swfobject.embedSWF(path,divID,width,height)
to load other videos which doesn't work.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SWFObject v2.x 将目标 HTML 元素替换为
如果您想要对多个 SWF 嵌入使用相同的目标元素,则需要在尝试后续嵌入之前重新创建目标元素。 这里是本主题教程的链接(向下滚动到“用另一个 SWF 替换已加载的 SWF”)。
SWFObject v2.x replaces the target HTML element with an
<object>
.If you want to use the same target element for multiple SWF embeds, you'll need to re-create the target element before attempting your subsequent embed. Here's a link to a tutorial for this topic (scroll down to "Replacing a loaded SWF with another SWF").
我知道这是一篇较旧的帖子,但我想提一下我最终只使用了 YouTube javascript API 切换视频。比尝试删除对象并添加另一个对象更简单,而且过渡看起来更干净。
I know this is an older post, but just thought I'd mention that I ended up just using the YouTube javascript API to switch the video. Simpler, and the transition looks cleaner than trying to remove the object and add another one.