tags:

views:

1060

answers:

1

Hi!

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)

+1  A: 

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

zaladane
Just changed that line:swfobject.embedSWF("/site_media/goapp/usersList.swf", "myAlternativeContent", "1000", "800", "9.0.0","expressInstall.swf", false, flashvars, params, attributes);But it doesn't help
Oleg Tarasenko
oups... i don't know how the false made its way to the code i added, just after "expressInstall.swf", please remmove that parameter. i will edit my post now.
zaladane
By the way I noticed that firebug shows me an errorcallbackFn is not a function[Break on this error] if (callbackFn) { callbackFn(callbackObj); }\n
Oleg Tarasenko