当我的 Flash 网站加载时,它会在初始动画中途冻结 2-3 秒,然后继续。这显然看起来不太好,我无法弄清楚是什么原因造成的。我认为它是 index.html 中的脚本之一,并尝试了各种方法来纠正它——我做错了什么?
<!DOCTYPE html>
<html lang="en">
<head>
<title>company name</title>
.
.
.
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/flashobject.js"></script>
<!--[if lt IE 7]>
<link href="ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
<body>
<header>
<hgroup>
<h1>company</h1>
<h2>company</h2>
</hgroup>
</header>
<div id="container">
<div id="head">
<div class="aligncenter"><a href="http://www.adobe.com/go/EN_US-H-GET-FLASH">
<img src="http://www.adobe.com/images/shared/download_buttons/get_adobe_flash_player.png" alt="" /></a>
</div>
</div>
</div>
<div class="g-plus" data-href="https://plus.google.com/100925740920754223119?rel=publisher" data-width="170" data-height="69" data-theme="light">
</body>
<!-- Flash -->
<script type="text/javascript">
var fo = new FlashObject("main_v10.swf", "head", "100%", "100%", "8", "");
fo.addParam("quality", "high");
fo.addParam("allowFullScreen", "true");
fo.write("head");
</script>
<!-- Hello Bar -->
<script type="text/javascript" src="//www.hellobar.com/hellobar.js"></script>
<script type="text/javascript">
new HelloBar(39040,52484);
</script>
<!-- GPlus -->
<script type="text/javascript">
window.___gcfg = {lang: 'en'};
(function()
{var po = document.createElement("script");
po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(po, s);
})();</script>
<!-- Google -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxxx-1']);
_gaq.push(['_setSiteSpeedSampleRate', 10]);
_gaq.push(['_trackPageview']);
(function init() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga,s);
})();
window.onload = init;
</script>
</html>