var obj=document.createElement('object');
obj.id="FlashFormulaEditor";
obj.width="520";
obj.height="500";
document.body.appendChild(obj);
table.appendChild(obj);
var swfVersionStr = "9.0.0";
// To use express install, set to playerProductInstall.swf, otherwise the empty string.
var xiSwfUrlStr = "";
var flashvars = {};
var params = {};
params.quality = "high";
params.bgcolor = "#ffffff";
params.allowscriptaccess = "sameDomain";
params.allowfullscreen = "true";
var attributes = {};
attributes.id = "FlashFormulaEditor";
attributes.name = "FlashFormulaEditor";
attributes.align = "middle";
swfobject.embedSWF("./FlashFormulaEditor.swf", "FlashFormulaEditor", "475", "552", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
答案 0 :(得分:1)
尝试一下:
function initFlash(){
var flashvars = {};
var params = {};
var attributes = {};
params.quality = "high";
params.play = "true";
params.loop = "true";
params.wmode = "transparent";
params.scale = "showall";
params.menu = "false";
params.devicefont = "true";
params.salign = "";
params.allowScriptAccess = "always";
params.allowFullScreen = "true";
attributes.id = "swfLoader";
attributes.name = "swfLoader";
swfobject.embedSWF("your.domain/flash.swf", "flashContent", "100%", "100%", "11", false, flashvars, params, attributes);
}
只需在你的div中添加一个id('flashContent')。希望这会有所帮助。