SWFobject似乎将参数添加到swf没有任何效果

时间:2022-06-04 18:11:27

I am trying to embed swf file into my html code. I am using swfobject 2 JS lib.

我试图将swf文件嵌入到我的html代码中。我正在使用swfobject 2 JS lib。

The code looks like following:

代码如下所示:

 <script type="text/javascript" src="/site_media/js/swfobject.js"></script>

                <script type="text/javascript">
            var flashvars = {};
            var params = {};
            params.scale = "noborder";
            params.bgcolor = "#ffffff";
            var attributes = {};
            attributes.id = "plist";
            attributes.align = "top";
            params.seamlesstabbing = "true";
            swfobject.embedSWF("/site_media/goapp/usersList.swf", "myAlternativeContent", "1000", "800", "9.0.0", false, flashvars, params, attributes);
        </script>

I expected the background color of the app to became white, but actually, nothing happens to loaded application, and it has it's default color themes. Also alignment dosn't do anything as well.

我希望应用程序的背景颜色变为白色,但实际上,加载的应用程序没有任何反应,它有默认的颜色主题。对齐也不会做任何事情。

Please help my to understand how to change bg color of swf application, and make it look like a part of the page (e.g. scale without scrollbars, etc)

请帮助我了解如何更改swf应用程序的bg颜色,并使其看起来像页面的一部分(例如没有滚动条的缩放等)

1 个解决方案

#1


I am afraid yoiu are missing the install swf file

我恐怕yoiu缺少安装swf文件

swfobject.embedSWF("/site_media/goapp/usersList.swf", "myAlternativeContent", 
                          "1000", "800", "9.0.0","expressInstall.swf",
                                 flashvars, params, attributes); 

otherwise you might want to set that parameter to null. Quickly check the doc for swfObject

否则您可能希望将该参数设置为null。快速检查swfObject的doc

#1


I am afraid yoiu are missing the install swf file

我恐怕yoiu缺少安装swf文件

swfobject.embedSWF("/site_media/goapp/usersList.swf", "myAlternativeContent", 
                          "1000", "800", "9.0.0","expressInstall.swf",
                                 flashvars, params, attributes); 

otherwise you might want to set that parameter to null. Quickly check the doc for swfObject

否则您可能希望将该参数设置为null。快速检查swfObject的doc