Shadowbox disappears behind Flash

classic Classic list List threaded Threaded
7 messages Options
s.
Reply | Threaded
Open this post in threaded view
|

Shadowbox disappears behind Flash

s.
Hi, I have a huge issue on a site that is calling a ShadowBox from a full page Flash swf.

 http://tr.im/vB9o 
(Click on the Flash link at the very bottom where it says : Mentions Legales)

On Macs, it works flawlessly on Safari and Firefox.
On Windows it seems to work fine on IE8.

On Safari 4 Windows and IE7, i see that the Shadowbox opens BEHIND Flash.

I have noticed this when, after having clicked on a link and saw no box, I reloaded and briefly saw the box while the page was being reloaded...

- I have set the Flash div's z-index to 0
- I have set wmode to transparent (and tried opaque)

I don't know what else to do... Please assist!

S.
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox disappears behind Flash

_ivan
I'll get back to you in a few days with the code(no time now), but if you wanna play it safe
when the shadowbox is activated hide flash and when you close shadowbox show flash.
We use that at our work & it works across all the browsers.
Something like this is enough (noticed that you use jquery):

var Graphi = {};
Graphi.hideFlash = function() {
$("object").css({ visibility: "hidden" });
$("embed").css({ visibility: "hidden" });
};

Graphi.showFlash = function() {
$("object").css({ visibility: "visible" });
$("embed").css({ visibility: "visible" });
};


If you can't figure it out when to call Graphi.hideFlash(); or Graphi.showFlash(); you have to wait a few
days for me to give you the exact code.

Ivan
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox disappears behind Flash

Wizzud
In reply to this post by s.
Well, believe it not, that's why line 867 in shadowbox.js was put there in the first place! You've commented it out, and so ...
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox disappears behind Flash

_ivan
In reply to this post by s.
Wizzud is right. You commented out in your shadowbox.js line which hides flash.
So solution to your problem is just to removed those backslashes!

Anyways, you have options to call functions when you open or close shadowbox.
Let's imagine that in shadowbox.js there is no functionality which hide/show flash, the simplest code would look like this:

Shadowbox.init({
         language: 'en'
        , players: ['img', 'html', 'swf']
        , onOpen: showFlash
        , onClose: hideFlash  
     }); //end:Shadowbox init

     function showFlash() {
         $("object").css({ visibility: "visible" });
         $("embed").css({ visibility: "visible" });
     }

     function hideFlash() {
         $("object").css({ visibility: "hidden" });
         $("embed").css({ visibility: "hidden" });
     }

 
s.
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox disappears behind Flash

s.
True, it was a leftover from a test... and the actual bug came from Action Script... Once I corrected AS it worked....

Thank you guys for the assist!

S.
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox disappears behind Flash

riaz b
hello all,

not sure if this has been suggested before but to solve my 'hidden flash' issue without editing the Shadowbox code (and allows you to use the faster/compressed version) is by doing a screen grab (use Flash's Export Image) of my Flash anim then setting the background of the containing DIV element to this image.
Hence, when Shadowbox opens (and hides my Flash anim), instead of a white space, the DIV now shows its background. For Flash material where not a huge part of the screen is being updated constantly, this works great. Beats dead space on any day!

anyway, thought i'd share
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox disappears behind Flash

neocorps
Hello man,

  can you tell me how you did this with flash? because I'm having the same problem, though for me it doesn't work on IE8 nor Safari.