# LightBox question

**URL:** <https://forum.kirupa.com/t/lightbox-question/264442>\
**Category:** web dev\
**Created:** [June 26, 2008, 5:46am UTC](https://forum.kirupa.com/t/lightbox-question/264442 "2008-06-26T05:46:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GGMcGee](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@GGMcGee](https://forum.kirupa.com/u/GGMcGee)\
**Post date:** [June 26, 2008, 5:46am UTC](https://forum.kirupa.com/t/lightbox-question/264442/1 "2008-06-26T05:46:05Z")

</div>

Hi,

Just added the [LightBox](http://www.lokeshdhakar.com/projects/lightbox2/) script to a web page, and it’s working, but…

When it comes into effect, darkening the web page, it completely removes any Flash objects on the page. Like it makes them invisible.

It’s not a major problem, because they reappear when the LightBox closes, but it would be nice if they didn’t disappear…

Does anyone know a way around this?

---

<div class="post-metadata">

**Author:** ![ramie](https://avatars.discourse-cdn.com/v4/letter/r/edb3f5/32.png) [@ramie](https://forum.kirupa.com/u/ramie)\
**Post date:** [June 26, 2008, 6:31am UTC](https://forum.kirupa.com/t/lightbox-question/264442/2 "2008-06-26T06:31:01Z")

</div>

How are you embedding the flash? Using [[U]SWFObject[/U]](http://blog.deconcept.com/swfobject/) alleviates this problem.

[http://blog.deconcept.com/swfobject/forum/discussion/84/flash-lightbox-display-priority/](http://blog.deconcept.com/swfobject/forum/discussion/84/flash-lightbox-display-priority/)

---

<div class="post-metadata">

**Author:** ![iRoY](https://avatars.discourse-cdn.com/v4/letter/i/a587f6/32.png) [@iRoY](https://forum.kirupa.com/u/iRoY)\
**Post date:** [June 29, 2008, 9:05pm UTC](https://forum.kirupa.com/t/lightbox-question/264442/3 "2008-06-29T21:05:16Z")

</div>

Is a Light box used to create clients?  
if not what is?

---

<div class="post-metadata">

**Author:** ![GGMcGee](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@GGMcGee](https://forum.kirupa.com/u/GGMcGee)\
**Post date:** [July 2, 2008, 4:17am UTC](https://forum.kirupa.com/t/lightbox-question/264442/4 "2008-07-02T04:17:37Z")

</div>

The fix doesn’t seem to be working for me.

This is how I’m embedding the Flash:

```auto

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','215','height','400','src','menu','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','menu','wmode','transparent','menu','false' ); //end AC code
            </script>
              <noscript>
              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="215" height="400">
                <param name="movie" value="menu.swf" />
                <param name="quality" value="high" />
                <embed src="menu.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="215" height="400"></embed>
              </object>
              </noscript>

```

I downloaded the Javascript file, and put the following script in the header:

```auto

<script type="text/javascript" src="js/swfobject.js"></script>

```

I then tried to embed the flash like this:

```auto

<script type="text/javascript">
        // <![CDATA[
        
        var so = new SWFObject("menu.swf", "menu", "215", "400", "0", "#ffffff");
        so.addParam("wmode", "transparent");
        so.write("flashcontent");
        
        // ]]>
    </script>

```

When I have this, the Flash just completely disappears off the page, even when the lightbox hasn’t been activated. Like it just isn’t there any more.

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [July 2, 2008, 12:29pm UTC](https://forum.kirupa.com/t/lightbox-question/264442/5 "2008-07-02T12:29:09Z")

</div>

I assume you’re looking at it on FF OSX cause that’s the only browser that has issues w/ it. It’s a bug w/ FF and there’s no real work around for it. At least not one that I know of.

The only real patch you could do is go into the lightbox code, remove the transparency code and just replace the div w/ a transparent png background, since it won’t be using coded opacity, it won’t affect the flash. And actually since this is a FF OSX specific bug you can just extend the script, to sniff for FF OSX and remove the opacity and just add a png background.

---

<div class="post-metadata">

**Author:** ![GGMcGee](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@GGMcGee](https://forum.kirupa.com/u/GGMcGee)\
**Post date:** [July 4, 2008, 12:38am UTC](https://forum.kirupa.com/t/lightbox-question/264442/6 "2008-07-04T00:38:59Z")

</div>

Viewing it in Firefox 2.0 on XP.

Yeah it doesn’t really matter… not a major problem. I’ll just let it be. After all, the Flash does come back after the Lightbox closes, so it isn’t that bad.

Thanks for the help.
