Friday, 27 September 2013

Flash v11.8.800.168 function call fails in Internet Explorer

Flash v11.8.800.168 function call fails in Internet Explorer

Company recently upgraded to Flash v11.8.800.168 and a flash movie which
is loaded using SWFObject (1.1) is not working correctly in Internet
Explorer (Firefox works fine). The movie is loaded dynamically using a
jquery document.ready method using the "new SWFObject(...);
so.write("ID")" method (again SWFObject 1.1).\
The movie on load calls a JavaScript function (which is built dynamically
using server scripting). The function is being called correctly as checked
by a debugger. The JavaScript function calls a method in the flash movie
passing it some XML (which is used to render some user and navigation
items).
Something like this:
function calledFromFlash() {
document.getElementById("FlashMovie").renderUsingXml('<?xml version
1.0"?><lotsofxml></lotsofxml>');
}
Like I said, this all works still in Firefox with the new Flash version.
When I step through the function above, using step into with the IE
Debugger, I get the following steps:
function anonymous() {
return eval(this.CallFunction("<invoke name=\"renderUsingXml\"
returntype=\"javascript\">" + __flash__argumentsToXML(arguments, 0) +
"</invoke>"));
}
At this point, I checked the arguments variable and it contains the XML as
one would expect. After the next step into, I get this:
try { __flash__toXML(calledFromFlash(undefined)); } catch (e) {
"<undefined/>"; }
At this point the debugger is already on the catch, yet one more step into
take the code into the "<undefined/>" section and I can see that e is
Object Expected
What I've tried:
Static implementation without SWFObject. This works. But then Firefox
doesn't process the XML properly (and it seems to be the same issue as IE)
Upgrading to SWFObject 2.2. Using dynamic implementation it fails still.
Using static implementation it works in IE but not Firefox
This is NOT my flash movie, the source is... well, I don't know. The guy
that wrote it has left the company. That said, this seems like such a
crazy issue.
My proposed fix is simply to use SWFObject for Firefox and use a static
implementation for IE, but I really want to know what is wrong.

No comments:

Post a Comment