differences between using wmode="transparent", "opaque", or "window" for an embedded object on a webpage
Asked Answered
S

5

75

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 requires 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.

Sarena answered 20/5, 2009 at 8:40 Comment(1)
Thanks for explaining that wmode="opaque" is needed so that other HTML elements won't be covered up. Embedding a youtube video was driving me crazy with this. YouTube's default embed code doesn't contain wmode and it was overlapping other divs even though they had higher z-index values. Thanks.Continue
C
36

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. Please refer to Adobe Knowledge Base about wmode.

Codfish answered 2/8, 2009 at 16:3 Comment(1)
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.Sarena
A
20

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

Aeroneurosis answered 20/5, 2009 at 9:8 Comment(0)
O
7

also, with wmode=opaque and with IE, the Flash gets the keyboard events, but also the html page receives them, so it can't be use for something like embedding a flash game. Very annoying

Oberheim answered 15/3, 2011 at 16:28 Comment(4)
This does not answer the question.Hollishollister
@bazmegakapa: how this is not answering the question? it's a very important difference in behavior (I suffered it on a very important games web site making it unusable :( ) and a not very well documented dif.Oberheim
The OP asked for resources on these arguments. Your answer would have made a good and important comment in my opinion.Hollishollister
Regardless of whether this belongs as a question or answer, this was very helpful. Thank you!Bhagavadgita
B
3

There's a pretty good write up in the Adobe KB's on 'wmode' and other attributes with regards to their effect on presentation and performance.

http://kb2.adobe.com/cps/127/tn_12701.html

Burette answered 12/10, 2011 at 18:3 Comment(0)
L
2

One bizarre thing is that in Chrome + Firefox, the MOUSE_LEAVE event isn't dispatched for OPAQUE and TRANSPARENT.

With WINDOW it works fine. That one took some time to find out! grr...

(note: jediericb mentioned this bug - which is similar but doesn't mention MOUSE_LEAVE)

Lousewort answered 18/5, 2011 at 19:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.