• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Transparent WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Transparent WebView


  • Subject: Transparent WebView
  • From: email@hidden
  • Date: Wed, 21 Nov 2007 15:12:46 +1300

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: NSTreeController and NSTreeNode
  • Next by Date: Re: Xcode 3, problem creating Core Data UI via drag and drop
  • Previous by thread: Re: CoverFlow
  • Next by thread: NSOpenPanel and a CoverFlow view option?
  • Index(es):
    • Date
    • Thread