views:

1395

answers:

5

Hi, I have a swf that requires flash 9, and I'm trying to show content over it. To facilitate this, I've set wmode to transparent. The problem is, this ONLY works when the user has flash 10 installed, and I really don't want to require flash 10 to view the content on the site I'm working on. When I pull up a div over the flash content with flash 9, the swf bleeds into or completely overwrites the div.

How can I prevent this without making flash 10 a user requirement?

I'm using swfobject to embed the swf and jquery-ui to display divs over the flash content.

EDIT:

This failure behavior is only noted in Safari.

+2  A: 

wmode transparent has been part of Flash for years and is not restricted to Flash Player 10.

regardless, you don't need to use wmode transparent; unless you truly need transparency in your SWF, you should use wmode opaque instead. it's less buggy and uses less processing power.

the trick is to also ensure your HTML elements have a 'position' stated in the CSS.

try following the examples and instructions here: http://pipwerks.com/lab/swfobject/z-index/2.0/index.html

pipwerks
Of course I've tested this (see my original link), though I've never seen YOUR page because you didn't provide a link.If you do your research you'll see that wmode 'transparent' makes a SWF transparent so you can see through it, as expected. However wmode transparent (and wmode 'opaque') also kicks Flash Player into a different rendering mode that allows HTML elements to be placed OVER the SWF.How it winds up looking is determined by your CSS and HTML.
pipwerks
A: 

I found this in my bookmarks (and they are from the pre-10 era). Though I don't have any Flash Player 9 / Safari over here to validate this right now. Give it a shot.

Different WModes for Browsers

As pipwerks said, WMode should control this, but not all platforms/browsers handle them correctly. In that case I would consider this to be Safari's/Flash9 fault and not fixable.

Marcel J.
A: 

try setting the wmode parameter to opaque. That seems to solve a lot of HTML layer/depth problems when Flash is involved.

Jeeva S
+1  A: 

I can't offer advice that could solve the problem, so I'll suggest that you might want to avoid the problem, instead.

Rather than have the (x)html content over the flash content in the z-index

+------------+
|            |
| +-------------+
| |   html      |
| |             |
| +-------------+
|   Flash    |
+------------+

How about instead placing the (x)html content above the Flash in the window:

+------------+
|  html      |
|            |
+------------+
+------------+
|            |
| Flash      |
|            |
|            |
|            |
|            |
+------------+

It's not ideal, but it at least offers a workable solution until Flash/html can co-exist more successfully.

David Thomas
This is not possible in this specific case. The flash is pretty high up on the page, and I'm pulling up jquery-ui components. I'd be all over a workaround if it was possible.
Stefan Kendall
Kudos on the ascii diagram by the way.
Stefan Kendall
Your situation scares me, because I don't think there's a particularly functional alternative, sadly. But here's hoping! And yeah, who doesn't love ascii =)
David Thomas
+2  A: 

I'm not sure if this will help you per se. But I've used following method to show content over flash.

I had faced this problem some time ago. I was to show user a popup for Terms and Conditions for registration on a site. Popup was coming okay, but There was a flash movie at top of the page which was hidding upper portion of the dialog. The tested and widely used method is to put an Iframe at place where you want to show your content and absolute position your content and IFrame. For example, if you want to show a div above a flash movie, then place a IFrame like follows:

    <iframe style="position:absolute;top:250;left:150;"></iframe>

Then position the div exactly above this iframe like:

    <div style="position:absolute;top:250;left:150;"></div>

I was using jquery on the page to show dialog using ui.dialog plugin. After fooling around sometime I devised following simple solution.

1) put id attribute on movie element to uniquely identify the movie object. Like,

<object id="movie1"></object>

2) before showing the dialog (or other content for that matter) call a javascript function to hide the movie. Like,

$("#movie1").css("display","none");

3) now show dialog. Like,

$("#dialog").dialog("open");

4) after closing the dialog, show the movie again. Like,

  $("#dialog").dialog("close");
  $("#movie1").css("display","inline");
TheVillageIdiot