我已将我的Flash文件发布到html页面。一旦flash动画结束,我将如何自动关闭此页面。我可以通过actionscript告诉flash停止,但我需要整个页面自动关闭。
尝试使用javascript告诉网站在5秒后(动画时间)关闭。不想工作。只要在动画结束后关闭,关闭时间就无关紧要了。这是代码:
<html>
<head>
<meta charset="UTF-8">
<title>Splashload</title>
<style type="text/css" media="screen">
html, body { height:100%; background-color: #ffffff;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:100%; height:100%; }
</style>
</head>
<script>
function loaded()
{
window.setTimeout(CloseMe, 500);
}
function CloseMe()
{
window.close();
}
</script>
<body>
<div align="center" id="flashContent">
<object type="application/x-shockwave-flash" data="Splashload.swf" width="766" height="750" id="Splashload" style="float: none; vertical-align:middle">
<param name="movie" value="Splashload.swf" onLoad="loaded()" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</object>
</div>
</body>
</html>
出于测试目的,这是SWF fie
http://www.megafileupload.com/en/file/512654/Splashload-swf.html