Hi. I don’t know if anyone will be able to help with this, but I’m having a problem with ExternalInterface in IE7/Flash 8. It’s a pretty simple operation: I want to set an ID on a page in JavaScript, then have the .swf grab that ID by calling a function that returns the value. Currently, the JavaScript looks like this:
<script type="text/javascript">
function getPageID() {
alert("function called.");
return 0;
}
</script>
and the function call in Flash looks like this:
var nPageID = ExternalInterface.call("getPageID");
ExternalInterface.call("alert", nPageID); // shows "0" in FireFox, but "null" in IE7
this.tfTest.text = nPageID; // shows same results as alert above
This all works fine in Firefox, but in IE, although getPageID gets called, the value it returns to Flash is always “null”. I tried delaying the call by a few frames to make sure everything was loaded, but that didn’t help at all. This is hosted on my local Apache install (localhost, in other words), but i tried uploading it to my webserver and that didn’t help either. Does anyone have an ideas on what might be causing this?
Thanks in advance!
Mike (mike at crookedgrin dot com)