![](/img/trans.png)
[英]How do I embed a swf with 100% width and height using swfObject and spark?
[英]SWFObject - How to embed SWF in a different folder to the html?
<div id="flashContent">
<h1>You need at least Flash Player 9.0 to view this page.</h1>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<script type="text/javascript">
//Dynamic publishing with swfObject
//A 'name' attribute with the same value as the 'id' is REQUIRED for Chrome/Mozilla browsers
var flashvars = {};
var params = {"base": "../flashgame_new/"};
var attributes = {id: "iTag", name: "iTag"};
swfobject.embedSWF("flashgame.swf", "flashgame", "720", "610", "9.0", null, flashvars, params, attributes);
</script>
我可能只是犯了一個非常愚蠢的錯誤,因為我很累,但有人有任何建議嗎? 干杯。
嘗試在基本路徑中刪除“..”並引導“/”。
var params = {"base": "iTag_FLASH_new/"};
您不需要指定“base”標記,可以將其指定為embedSWF的一部分。
根據您的信息:頁面位於:(http://blah/whatever.html),閃光燈位於:(http://blah/iTag_FLASH_new/iTag.swf)
我將直接在瀏覽器中確保swf正確加載的路徑...
如果您的頁面位於:(http://blah/somedirectory/whatever.html)並且閃存處於(http://blah/somedirectory/iTag_FLASH_new/iTag.swf)
你需要將路徑指定為“iTag_FLASH_new / iTag.swf”,注意缺少斜線。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.