Skip navigation.
 
mlTransparent WebView
FROM : mano
DATE : Wed Nov 21 03:12:46 2007

Hi!

I want to display a transparent Flash animation in a transparent window. I could
instantiate a transparent window, place a WebView on it, and display the Flash
animation there on the WebView. Compilable  sample code demonstrating the
problem is at
http://www.cs.auckland.ac.nz/~mano/WebViewTest.zip

The problem is that the WebView itself isn't transparent, so the background
shows. On the web, there are several questions on how to get this to be
transparent, and there are some answers which do not appear to work.

A popular solution appears to be placing the Flash object on a transparent HTML
page and displaying this page on the WebView (rather than directly displaying
the Flash animation on the WebView); in addition this solution requires using an
undocumented WebView method setDrawsBackground to turn off drawing background
of WebView.

Some of the commented out code fragments in WebViewWindow.m essentially
attempted this solution. But it does not work.

If I replace the WebView with NSImageView and place a transparent GIF there,
then I get the transparent animation. Therefore the issue appears to be with
WebView (rather than the window).

I would appreciate getting some help on how this could be solved.

Cheers,
Mano

Related mailsAuthorDate
No related mails found.