views:

12654

answers:

4

when embedding a Flash object with the <object> and <embed> tag, there is an attribute called "wmode". It seems that most of the time, wmode="transparent" is the same as wmode="opaque" as the Flash doesn't actually have any transparent color so that the bottom HTML element is to be shown. As a result, "opaque" should be faster than "transparent" since it require less processing for transparency, yet most of the time i see Flash object embedded with "transparent" instead of "opaque".

"opaque" is needed so that other HTML element won't be covered up by the Flash object. (such as a menu item that pops up an extra sub-menu won't be covered up by the Flash object).

By the way, is there formal documentation for wmode's "opaque", "transparent", and "window"? I was only able to find blogs that describe it but not the formal documentation. thanks.

+5  A: 

Opaque will cause less system strain since 'transparent' will still attempt to apply alpha. The reason you see transparent used instead is because most web authors don't pay attention to detail (ie, just copy-pasted some embed code they found).

BTW, you are correct about it being undocumented. The best I've ever seen is a blog by a guy who claims to have talked to a Macromedia developer about it. Unfortunaetly I can't find the link.

EDIT: I think it was this one: http://www.communitymx.com/content/article.cfm?cid=e5141

SpliFF
+2  A: 

Also, using WMode Opaque will cause the flash to appear on the correct Z-index, so that it does not hide menus or other objects, whereas WMode Transparent is always on the top layer. Not very transparent, but that is how it works.

+3  A: 

Here is some weak adobe documentation on different flash 9 wmode settings.

A note of caution on wmode transparent is here in the adobe bug trac.

And new for flash 10, are two new wmodes: gpu and direct. I could not find the official documentation for these new modes.

update: more information on gpu

jedierikb
great, here is a quote of the doc: wmode - Possible values: window, opaque, transparent. Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser.window - movie plays in its own rectangular window on a web page.opaque - the movie hides everything on the page behind it.transparent - the background of the HTML page shows through all transparent portions of the movie, this may slow animation performance.
動靜能量
+1  A: 

wmode="window" is the default value

Jackson