0

助けてください、私はほとんど怒っています...重要なコードは以下にあります、それは機能しません、「オブジェクト」には何もありません:

    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);
4

1 に答える 1

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);
        }

id('flashContent') を div に追加するだけです。お役に立てれば。

于 2013-03-12T05:15:59.977 に答える