任何人都可以解释如何通过PHP将swf对象嵌入到facebook画布页面中。
<?php
function sswf($swf,$swfh,$swfw) {
echo "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0' ID=objects WIDTH=$swfw HEIGHT=$swfh><PARAM
NAME=movie VALUE='$swf'><EMBED src='$swf' WIDTH=$swfw HEIGHT=$swfh TYPE='application/x-shockwave-flash'
PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></OBJECT>";
}
$mf = "mmmm1.swf";
sswf($mf,690,1000);
?>
上面的代码虽然上周发布但不再有效......它有什么问题?
答案 0 :(得分:1)
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var params = {allowFullScreen:'false', allowscriptaccess:'always', wmode:'opaque'};
var flashvars = {};
var attributes = { name:"xxx", id:"xxx" };
swfobject.embedSWF("xxx.swf?<? echo(time()) ?>", "xxx", "520", "500", "9.0", null, flashvars, params, attributes);
</script>
<div id="fb-root"></div>
<div id="xxx">
<h1>You need at least Flash Player 9 to view this page.</h1>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="https://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>