Positioning embed over embed with wmode direct - html

I need to position a flash banner over gpu accelerated video player. I have read somewhere, that wmode direct is very important. But don't remember why.
How do i position a banner over it if i can't set wmode to opaque?
Thanks.

Short answer : You can't.
Long answer : wmode direct remove the swf from the browser display, and placed on top of it. That way, it is possible to make use of the gpu. With wmode opaque (or transparent), the swf is displayed by the browser, and the gpu acceleration can't be used.
The drawback of using wmode direct is that the swf is displayed on over all the document. So nothing can be placed over it (except maybe another direct swf - no tested, and I wouldn't recommend it). Ever.
What are the workarounds possible from this problems ? I can think of two :
foregoing gpu acceleration. Does your swf really needs gpu acceleration ? Chances are, if you don't display video, 3D graphics, or hundreds of moving sprites, that it doesn't really need it. If so, use wmode opaque, you'll loose a bit of performance, but you'll be able to place your banner.
place de banner within the swf. This'll need to edit the flash, but you could display a banner from within it. As long that this banner is an image, or another swf, it wouldn't be very hard using the Loader class.

Related

game wmode issue when dealing with divs on top

I am using starling for rendering so I must use wmode=direct in my application for it to work.
Having said that I need to show a box on top of flash under some circumstances. But when I show the box it appears on the back because of the wmode (works fine with opaque).
Is there any way I can show content on top of flash while I am in wmode=direct?
You can try showing that box within SWF on 2D level, that level is by design above Stage3D content.

Loadins Starling swf within another swf

I have an swf which does not use stage3D it's a simple swf. I also have an swf which runs starling. Now, I want to load the starling swf inside the first swf. Is something like that possible?
Short answer: Yes it is possible.
Hints:
you have to set the backgroundAlpha = 0, in your normal flash file, in order to be able to see the stage3D context.
take care your html file which is the wraper for flash, specifies that wmode = direct
watch out how you unload / stop the starling content when you do not need it any more.
Performance:
As long as you release the resources that you do not need, having a mix should not cause performance issues.
Try not to perform heavy operations on both normal flash and starling content in the same time.
It is possible you just need to remember that stage3d content (starling) will always be below display list. Performance should only be issue on mobile, if you only target web it should be fine.

HTML above flash without wmode?

Could someone settle this little dispute please.
If I set wmode=transparent on the flash template everything works magically. However, the flash developer says that by doing this the template will be slowed down significantly..
So the questions.
1) How much of an impact does wmode have on performance today?
2) Is there any other way to place HTML on top of flash?
It should be noted the HTML only appears on top of the flash when they click on a video -> rare. The flash only is animated again after the video is closed and the user clicks on a rollover or whatever.
I've done a bunch of websites with transparent flash objects and heavy animations, etc.. I've never noticed any change. I think it should only matter if you had issues with performance to start with (zillions of vectors being animated or something).

HTML is displaying oddly when Flash is present

The site I'm making uses a tabbed navigation and MooTools to fade the pages in and out. One of the pages has a Flash player embedded on it, and all of the others consist of pure HTML. The problem occurs on the HTML pages -- somehow the Flash player is causing the HTML pages to display oddly. Vertical borders and text will be jagged in the same locations of the top and bottom of the player. I don't have any code to show because it would be quite overwhelming to sift through, but has anyone run into a similar problem and know of a simple fix? Thank you!
My first thought is that this probably has to do with your wmode setting on the flash player.
Quote from http://www.communitymx.com/content/article.cfm?cid=e5141
Window Mode (wmode) - What's It For?
There are three window modes. Windowless mode allows you to take advantage of the transparent movie, absolute positioning, and layering capabilities available in the browser. They are controlled with the wmode parameter in the object tag. The default mode is available by either choosing not to specify any wmode, or by using wmode="window". We'll look at Macromedia's explanation of the three modes and then we'll explore them a bit further individually.
Window: Use the Window value to play a Flash Player movie in its own rectangular window on a web page. This is the default value for wmode and it works the way the classic Flash Player works. This normally provides the fastest animation performance.
Opaque: By using the Opaque value you can use JavaScript to move or resize movies that don't need a transparent background. Opaque mode makes the movie hide everything behind it on the page. Additionally, opaque mode moves elements behind Flash movies (for example, with dynamic HTML) to prevent them from showing through.
Transparent: Transparent mode allows the background of the HTML page, or the DHTML layer underneath the Flash movie or layer, to show through all the transparent portions of the movie. This allows you to overlap the movie with other elements of the HTML page. Animation performance might be slower when you use this value.
Adobe's property listing: http://kb2.adobe.com/cps/127/tn_12701.html
you are using swfobject lib for adding the flash, arent you?
I had a different problem but maybe helps, with a jquery submenu been hidden by a flash movie, and I solved this with CSS z-index property.
Thanks, everybody, for your answers. Flash is definitely the culprit here, since the problem only exists when the embedded Flash player is present. The player is actually created by Kyte, so it's not the standard players that are made through Flash/Dreamweaver. I tried changing the wmode parameter, which useful, but didn't work. And the z-index thing didn't work either. I'll keep trying it, though, because it seems that should work.

How to embed an unobtrusive flash?

I have an embedded flash that is transparent so it looks like part of the background. I achieved that by setting wmode to transparent.
My problem is that the area underneath the flash becomes inaccessible, even though the flash is transparent. Therefore I cannot click on any links or buttons that are under the flash object.
How do I make the flash unobtrusive?
Clarifications:
- the flash is transparent but it has an animation that shows in the background.
- wmode set to transparent lets you click the contents underneath in IE but not Firefox.
The problem is that in your document, the object/embed that contains the Flash animation is on top of the elements you need to access. You need to put these elements on top of the Flash animation instead of the other way around.
The way to do this is to set the object's wmode to opaque, and use the CSS z-index property to set it to a z-index lower than the z-index of whatever elements you want to float over it -- you can do this in CSS or just with inline style="" attributes.
Here's an example using SWFObject to create the object/embed tags, but the same principle applies if you are just hardcoding these into your HTML.
I didn't know there could be such a thing as unobtrusive flash.
On a more serious note: what are you trying to accomplish with a layer of flash anyways?
I suggest taking a step back and looking at the page as a whole. If the things below the flash are needed, then make the flash go somewhere else or replace it with actual elements in the page to serve the same purpose.
What is the purpose of the Flash? If it doesn't do anything visible, then you can make it 1 pixel in size and/or put it in a div that is absolutely positioned off the screen.
I think I might have found the answer to my own question.
There is a javascript library called Unobtrusive Flash Objects (UFO), which got deprecated and now is swfobject.
I will give it a go and report back.