swfembed 不工作
我在嵌入全屏 Flash 画廊时遇到问题。 单击缩略图时会执行 swfobject.embedSWF,它会创建 Flash 对象并显示图库。 当关闭 flashgallery 时,我将删除整个 flash 对象。 然后,当单击另一个缩略图时,用于嵌入对象的 swfobject.embedSWF 不再起作用 可能是什么原因?
i'm having a problem with embedding a full screen flash gallery.
when clicking a thumbnail executes swfobject.embedSWF which creates the flash-object and the gallery is showing up.
when closing the flashgallery, i'm removing the whole flash-objects.
then when clicking another thumbnail, swfobject.embedSWF for embedding the object simply doesn't work anymore
what could be the reason?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您使用 SWFObject 时,您的目标元素(通常是 div)将替换为
如果您删除 SWF,然后尝试使用相同的目标 ID 嵌入新的 SWF,您会发现您的目标不再存在 - 不再有具有该 ID 的 HTML 元素。
您需要做的是在尝试执行第二次嵌入之前使用脚本重新创建元素。
这里有关于该主题的教程和示例:
http://learnswfobject.com/advanced-topics/ load-a-swf-using-javascript-onclick-event/
(请参阅“用另一个 SWF 替换已加载的 SWF”)
When you use SWFObject, your target element (commonly a div) will be replaced by the <object> generated by SWFObject.
If you remove your SWF then try to embed a new SWF using the same target ID, you will find your target no longer exists -- there is no longer an HTML element with that ID.
What you'll need to do is use a script to re-create the element before attempting to perform your second embed.
There's a tutorial and example on that topic here:
http://learnswfobject.com/advanced-topics/load-a-swf-using-javascript-onclick-event/
(See "Replacing a loaded SWF with another SWF")