# Externalinterface.call not working with background-image

**URL:** <https://forum.kirupa.com/t/externalinterface-call-not-working-with-background-image/307661>\
**Category:** Uncategorized\
**Created:** [April 7, 2010, 8:09pm UTC](https://forum.kirupa.com/t/externalinterface-call-not-working-with-background-image/307661 "2010-04-07T20:09:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bfink](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bfink](https://forum.kirupa.com/u/bfink)\
**Post date:** [April 7, 2010, 8:09pm UTC](https://forum.kirupa.com/t/externalinterface-call-not-working-with-background-image/307661/1 "2010-04-07T20:09:07Z")

</div>

I’ve put together a slideshow in AS3. When the user clicks on an image in the slideshow, I’m using FlashLightboxInjector to bring up a Lightbox version of the image they just clicked on. In my AS3, each time I add a thumbnail into the slideshow, ExternalInterface.call is supposed to call a function within FlashLightboxInjector that appends the image onto a \<div\>. The div is used as a reference to Lightbox to know what the image path/title are.

```auto

public function buildPicArray():void
        {
            for each(var pic:XML in picXML.photo)  
            {
                trace("doing stuff");
                titles.push(pic.title);
                
                thumbLoaders.push(new Thumbnail(pic.thumb,0));            
                numPics++;
                flash.external.ExternalInterface.call("myFlashLightBoxInjector.appendElement", pic.large + "", pic.title + "", pic.title + "", "slideshowPics");
                thumbLoaders[thumbLoaders.length-1].addEventListener(MouseEvent.MOUSE_UP,LBIRelease);
                trace("here");
            }            
            addThumbs();
        }

public function LBIRelease(evt:MouseEvent):void
        {
            trace(titles[thumbLoaders.indexOf(evt.target)]);
            var t:String = titles[thumbLoaders.indexOf(evt.target)];
            flash.external.ExternalInterface.call("myFlashLightBoxInjector.start", t);
            trace("hello");
        }         

```

This works fine when I don’t use a background-image in the body css. However, when I do use a background image, none of the myFlashLightboxInjector.append() functions are called or the appends aren’t functioning correctly because they don’t show up in Firebug, there is just an empty div. So, when I click on a thumbnail, no Lightbox image comes up. This is driving me nuts, any suggestions?
