嗨夥計,Flash影片沒有加載
我想在
ilogicconcepts.com.sg
由於某些原因要顯示在我的客戶的網頁一個簡單的flash動畫,電影乾脆拒絕加載,並且絕對不是權限問題,因爲我可以通過http://ilogicconcepts.com.sg/media/home.swf直接查看電影。
我檢查了螢火蟲,似乎該網頁甚至沒有嘗試加載電影。任何想法都會非常感激。
謝謝。
嗨夥計,Flash影片沒有加載
我想在
ilogicconcepts.com.sg
由於某些原因要顯示在我的客戶的網頁一個簡單的flash動畫,電影乾脆拒絕加載,並且絕對不是權限問題,因爲我可以通過http://ilogicconcepts.com.sg/media/home.swf直接查看電影。
我檢查了螢火蟲,似乎該網頁甚至沒有嘗試加載電影。任何想法都會非常感激。
謝謝。
我認爲你應該使用SWFObject。您可以從此處下載js文件和expressinstall文件:http://code.google.com/p/swfobject/downloads/detail?name=swfobject_2_2.zip&can=2&q= 您需要用於嵌入的js文件,並且如果舊版本需要,expressinstall.swf會自動更新用戶Flash Player。您可以設置最低版本的播放器,將自定義變量添加到Flash中,還可以設置Flash影片的參數和屬性。有關更多詳細信息,請參閱swfobject文檔。
我修改了你的代碼,所以如果你把swfobject.js文件放到js文件夾中並將expressinstall.swf文件放到媒體文件夾中並用下面的代碼替換你的代碼,它應該可以正常工作。我在FF3和Chrome上測試過它,它適用於我。
代碼:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="/css/style.css" /> <link rel="stylesheet" type="text/css" href="/js/lightbox/css/lightbox.css" />
<title>Welcome to Ilogic Concepts Singapore.</title>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3702519-11']);
_gaq.push(['_trackPageview']);
(function() {
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);
})();
function initFlash()
{
var flashvars = {};
var params = {
allowScriptAccess: "sameDomain"
};
var attributes = {};
swfobject.embedSWF("media/home.swf", "flashcontent-home", "450", "338", "9.0.0", "media/expressInstall.swf", flashvars, params, attributes);
swfobject.createCSS("#flashcontent-home", "width:450px; height:338px; float:left; margin-right:10px;");
}
</script>
</head>
<body>
<div id="container">
<div id="header"></div>
<div id="main">
<script type="text/javascript" src="/js/jquery.js"></script><script type="text/javascript" src="/js/jclock.js"></script>
<div id="nav-wrapper">
<div class="jclock"></div>
<ul id="nav">
<li><a href="/">HOME</a></li>
<li><a href="/about">ABOUT US</a></li>
<li><a href="/services">SERVICES</a></li>
<li><a href="/portfolio">PORTFOLIO</a></li>
<li><a href="/contact">CONTACT US</a></li>
</ul>
</div>
<script type="text/javascript">
$(function($) {
$('<img src="/img/button-bg-alt.png" alt="" />');
$('.jclock').jclock({
format: '%A, %d.%m.%Y - %H:%M:%S'
});
});
</script>
<div id="content">
<div class="heading-page">HOME</div>
<div id="homeWelcome">
<div id="flashcontent-home"></div>
<div id="passage">
Welcome,<br/><br/>
We believe that good design <br/>
is timeless in both <br/>
function and nature. <br/><br/>
Through years of experience, <br/>
we create rooms that reflect <br/>
our clients' individual <br/>
needs and personal style.
</div>
</div>
</div>
</div>
<div id="footer"></div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3702519-11']);
_gaq.push(['_trackPageview']);
(function() {
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);
})();
initFlash();
</script>
</body>
</html>
祝你好運, 羅布
跨域問題:http://www.actionscript.org/forums/showthread.php3?t=137138 – 2011-01-09 08:19:34
老鄉新加坡? – mauris 2011-01-09 08:19:39