views:

34

answers:

2

How can I programatically determine what the background color of my portlet will be before it's rendered? (ie in the init() or doview() functions).

I want to make an embedded flash movie look transparent-ish by having it's background color (which I can set programatically) match the background color of the portlet... but the portlet's background color could be anything depending on the overall portal theme or by the color manually chosen by the user in the "look and feel" setup.

Is this possible?

+1  A: 

You can't really, as that would be set, probably, in a stylesheet defined elsewhere. You might be able to adjust the alpha channel of the flash movie so that its transparent though.

mezmo
A: 

How can I programatically determine what the background color of my portlet will be before it's rendered?

This is not possible. You may be able to use some onload script to set a Flash parameter, but that is a fiddly approach.

You may be better off looking at WMODE and Flash alpha support.

Of course, setting the background colour of elements containing the object tags is an option.

McDowell