How do I set the background color in swfObject?
I am using swfobject to display some Flash content (please don't tell Steve Jobs) and I need to set the background color of the swfobject content to black so it blends nicely with the black page it is on.
I tried using the following code but it didn't change anything:
<object id="flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="600" bgcolor="#000">
What is the correct way to set the background开发者_Go百科 color to #000000?
Thanks.
I got some help over at the swfobject group on google.
The key is to add this to both sections of the object code and it solved the problem:
<param name="bgcolor" value="000000" />
if you want to set the flash background colour then you have to use the bgcolor setting in embedding, or add it to swfObject with the 6th value (see here). if you are using a transparent flash etc then the colour is defined by your html/CSS content. have a check of your background
or background-color
settings for the div you are embedding it into.
精彩评论