I've found that on Firefox and IE, lightbox will not render "over" Flash objects. So I added some code to hide them.
At the top of showLightbox()
embeds = document.getElementsByTagName('embed');
for(i = 0; i < embeds.length; i++) {
embeds[i].style.visibility = 'hidden';
}
At the top of hideLightbox():
embeds = document.getElementsByTagName('embed');
for(i = 0; i < embeds.length; i++) {
embeds[i].style.visibility = 'visible';
}
This is almost verbatim from code I found here.
Example of the revised version in action here
Comments
Comment #1
bugz_nz commentedThank you for taking the time to post this, I will have a look at it and apply it if it solves the issue.
Comment #2
elhombresinatributos commentedHi.
Depending on how you insert the flash and if you use IE or Firefox you need to insert this code:
And the same one changing "hidden" for "visible".
Also, for patching the lightbox.js (not the lite version) you can add the code in this places:
and...
Comment #3
elhombresinatributos commentedHEY! Forget about patching. I've found a much better solution in SitePoint.
The easiest way to hide flash content is just addign the param wmode-transparent to the flash itself. This lefts the javascript untouched.
Example:
It works for me in IE and FF.
Comment #4
drumdance commentedGood idea. The only issue is that I believe YouTube and Google video don't do this by default, so if you want to allow users to post videos like this, you'll have to manually add that param after the fact.
Comment #5
elhombresinatributos commentedWell, my site doesn't allow users to post, so there's no problem with this for me. I hope you can find a solution.
Comment #6
renato_chromee commentedNow, I see the same problem with Google Chrome 0.2.149.29!
Flash is still bright on top when Lightbox should darken the page.
Cheers
Renato
Comment #7
stella commentedrenato_chromee: please open a separate ticket for your issue. This one is dated 2006! And was for a completely different version of the lightbox2 module. Please provide details of your lightbox2 settings, the browsers/platforms the issues occur on and a link to your site if possible.
Cheers,
Stella
Comment #8
janmech commentedlightbox and lightbox2 offer an easy way to hide flash or any other elements: just add class="lightbox_hidden" to any element that shall be hidden when the lighbox-overlay is visible.