Search code examples
swfobject

SWFobject seems that adding parameters to a swf has no effect


I am trying to embed swf file into my html code. I am using 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)


Solution

  • I am afraid yoiu are missing the install swf file

    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