All Im trying to do is get a function in my AS3 to be called from javascript. Ive tried around 20 tuts/codes, nothing.
My Javascript/HTML: http://pastebin.com/vPbu41PN
AS3 Code:
function onBUnloadb(): void {
sa.addText("done");
xmlSocket.send(MyName+"||"+MyKey+"|| /disconnected "+MyName);
}
ExternalInterface.addCallback("onBUnload", onBUnloadb);
I am getting the error message in firefox
Error: TypeError: flashMovie.onBUnload is not a function
This should really not be this hard :/
What protocol is the HTML page being loaded from? If it’s
file:///, there are security restrictions when communicating with JavaScript.Try calling
Security.allowDomain('*')in your SWF.