# Problem with External Interface and dynamic image loading in Firefox

**URL:** <https://forum.kirupa.com/t/problem-with-external-interface-and-dynamic-image-loading-in-firefox/222029>\
**Category:** flash\
**Created:** [April 10, 2007, 8:11am UTC](https://forum.kirupa.com/t/problem-with-external-interface-and-dynamic-image-loading-in-firefox/222029 "2007-04-10T08:11:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksquare](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@ksquare](https://forum.kirupa.com/u/ksquare)\
**Post date:** [April 10, 2007, 8:11am UTC](https://forum.kirupa.com/t/problem-with-external-interface-and-dynamic-image-loading-in-firefox/222029/1 "2007-04-10T08:11:13Z")

</div>

Hi Guys,

Was just wondering if any of you have ever come across this before, I’m trying to build a flash interface that would read data from the Javascript/XML off the page it’s embedded in, and while it works in Safari and Internet Explorer, it won’t pass the url in Firefox.

It’s pretty straight forward, I have this on the HTML page:

```auto
<script>
    function thePageData() {
        var xmlData = "<pagedata><title>Apple</title><image>apple.jpg</image><cost>2</cost></pagedata>";
        document.getElementById("banner").loadThisData(xmlData);
        }
</script>

```

and the code that’s supposed to read it in Flash is:

```auto
import flash.external.ExternalInterface;
ExternalInterface.addCallback("loadThisData", this, loadThisData);

var appleImage:String;

function loadThisData() {
    xmlDataStr = arguments[0];
    xmlData = new XML(xmlDataStr);
    xmlData.ignoreWhite = true;
    xmlData = xmlData.firstChild;
    appleTitle = xmlData.childNodes[0].firstChild.nodeValue;
    appleImage = xmlData.childNodes[1].firstChild.nodeValue;
    appleCost = xmlData.childNodes[2].firstChild.nodeValue;
    if (!mc_image.imageHolder) {
        mc_image.createEmptyMovieClip("imageHolder", 1);
        var imageLoader:MovieClipLoader = new MovieClipLoader();
        imageLoader.loadClip(appleImage, mc_image.imageHolder);
    }
}
ExternalInterface.call("thePageData");

```

I’ve basically no clue why it isn’t working in Firefox. I see no reason for it not to. I’ve even set the \<param name=“allowScriptAccess” value=“always” /\> in the object parameters.

Any help would be appreciated.

Thanks!
