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:
<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:
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!