ie8 error object required external interface callback fix
Posted: Fri Apr 29, 2011 11:24 pm
I traced a bug in internet explorer 8 where for no reason an error:
would come up no matter how I edited my javascript, php, or html. It wasn't present at all, a ghost bug. I thought it might be something flash built, and the code:
import flash.external.* was fine, but the .addCallback kept throwing that crazy ie8 error, so I added an .allDomain for all, or * surrounded by double quotes. Voila, the hidden javascript running in the compiled swf that is embedded with the object tag now works without any error.
Code: Select all
object required line:48 char:3
Code: Select all
import flash.external.*
flash.system.Security.allowDomain("*")
//
function changeSize(sW,sH):void
{
tF_js.text="changeSize("+sW+":"+sH+")";
}
ExternalInterface.addCallback("changeSize",changeSize);