SWF文件已上传到服务器但未在嵌入中显示

时间:2014-09-26 07:34:29

标签: actionscript-3 flash

我已将.swf文件嵌入到我的代码中,但在测试时不会显示。它直接从源(http://pandadol.com/pics/sydneyedit/300x250.swf)播放,但不从HTML文件播放。

<html>
<head>
</head>

<body>

<object data="http://pandadol.com/pics/sydneyedit/300x250.swf">
   <param name="movie" value="http://pandadol.com/pics/sydneyedit/300x250.swf">  
</object>

<object data="http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf">
   <param name="movie" value="http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf">  
</object>

</body>

</html>

我把它放在Adobe的默认设置中只是为了看看它是不是我的flash播放器是问题,但它似乎显示正常。

我必须要有一些荒谬的东西。如果有人有线索我会很感激。

2 个答案:

答案 0 :(得分:0)

classidcodebase以及widthheight都是<object>代码的必需属性。此外,还需要movie参数。

http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html

答案 1 :(得分:0)

使用的代码是:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="movie_name" align="middle">
    <param name="movie" value="movie_name.swf"/>
    <object type="application/x-shockwave-flash" data="movie_name.swf" width="550" height="400">
        <param name="movie" value="movie_name.swf"/>
        <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>
</object>

或者:

<div id="myContent">
  <p>Alternative content</p>
</div>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

<script type="text/javascript">
    swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0");
</script>