views:

50

answers:

3

Since there is no way that you can make the flash object transparent, there needs to be some other means by which you can match the background. I thought of maybe creating a ActionScript/Javascript bridge, but I wonder if this is the route to take.

Do I have a better option?

A: 

I think FlashVars are a good option.

Jorge
I considered that too... __BUT__ consider then that whenever the background is changed on the page, someone has to remember to update the flashvars too.
George Edison
True. I was thinking...maybe a config file (xml, json) created by a javascript fetching the color. It's just a thought...
Jorge
+5  A: 

Wouldn't wmode=transparent or wmode=opaque fix that ..

http://kb2.adobe.com/cps/142/tn_14201.html

drusnov
Doesn't work. I should add that I'm using the Flex SDK with FlashDevelop.
George Edison
Nvm, I set `backgroundAlpha="0"` in the `mx:Application` and it worked.
George Edison
A: 

I agree with drusnov. In the flash object's embed tags, you can set wmode='transparent' which will effectively removed the solid background from your swf. This comes with a bit of a performance penalty, however. (Usage examples and performance explination)

If the background color of your page is solid, you could match the 'bgcolor' value within the flash objects embed tag with minimal Javascript.

(I am assuming you are dealing with either a dynamic page background color, or one which you expect will change eventually.)

turkeyburger