penders - 8:08 pm on Jul 24, 2011 (gmt 0)
bgcolor ... Use this attribute to override the background color setting specified in the Flash file.
Ah OK, I had wondered whether the flash movie itself was somehow reading this value.
The bgcolor value shouldn't be set to transparent -- just a hexadecimal RGB value. That's why browsers don't interpret it correctly...
It appears that Flash (rather than the browser) attempts to convert anything in the bgcolor attribute to an RGB colour?! So 'transparent' just so happens to convert to a greeny colour it seems, just like bgcolor="diamonds" converts to a deep gold!
What if a user decides to display the flash default background color?
A 'user'? Is this not something you are controlling on your own website?
<embed id="foo" bgcolor="'+x+'" wmode="'+y+'"
src="http://www.w3schools.com/media/bookmark.swf" width="400" height="40"
var htm = '';
htm += '<embed id="foo" bgcolor="' + x + '" wmode="' + y + '"';
htm += ' src="http://www.w3schools.com/media/bookmark.swf" width="400" height="40"';
htm += ' type="application/x-shockwave-flash" />';
This assumes x and y have been defined above in your code.