SwfObject JavaScript を使用して Flash オブジェクトを作成しようとしています。FF と chrome では問題なく動作しますが、背景色は表示されません。
私のJSコード
var swfWidth = "500";
var swfHeight = "500";
var swfBgColor = "#ff0000";
var flashVersion = '9.0.0'
var flashvars = false;
var params = { bgcolor:swfBgColor };
var attributes = {};
swfobject.embedSWF(swfUrl, "kcSwf", swfWidth, swfHeight, flashVersion, "/resources/expressInstall.swf", flashvars, attributes, params);
これは、上記のコードの IE での出力です。
タグにbgcolorプロパティを設定しますが、タグに bgcolor を設定しません(以下を参照)。
<OBJECT style="VISIBILITY: visible" id=kcSwf classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=620 height=540 bgcolor="F8F8F8"><PARAM NAME="_cx" VALUE="16404"><PARAM NAME="_cy" VALUE="14287"><PARAM NAME="FlashVars" VALUE="">
<PARAM NAME="Movie" VALUE="http://test.skf.com/CampaignBanner/knowledgeengineering/090309_banners/flash_example.swf">
<PARAM NAME="Src" VALUE="http://test.skf.com/CampaignBanner/knowledgeengineering/090309_banners/flash_example.swf">
<PARAM NAME="WMode" VALUE="Window"><PARAM NAME="Play" VALUE="-1">
<PARAM NAME="Loop" VALUE="-1">
<PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE="">
<PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE="">
<PARAM NAME="Scale" VALUE="ShowAll">
<PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0">
<PARAM NAME="BGColor" VALUE=""> // <--- check this
<PARAM NAME="SWRemote" VALUE="">
<PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<PARAM NAME="Profile" VALUE="0">
<PARAM NAME="ProfileAddress" VALUE="">
<PARAM NAME="ProfilePort" VALUE="0">
<PARAM NAME="AllowNetworking" VALUE="all">
<PARAM NAME="AllowFullScreen" VALUE="false">
<PARAM NAME="AllowFullScreenInteractive" VALUE="">
</OBJECT>