Can I destroy a flash object created with SWFObject?

陌路散爱 提交于 2019-12-05 21:41:52

swfobject.removeSWF("myVideoPlayer");

--

Edit: this kills off the original <DIV> that you used to create the swfobject in the first place.

So if you need to recreate the Flash again you'll need to insert a new placeholder <DIV>.

<!-- you'll need to wrap the 'myVideoPlayer' DIV in another DIV -->
<div id="videoPlayerWrapper">
   <div id="myVideoPlayer"/>
   <a href="#" class="close">Close Player</a>
</div>

swfobject.removeSWF("myVideoPlayer");
$('#videoPlayerWrapper').prepend("<div id='myVideoPlayer'></div>");

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!