I have a very odd problem with Flash 10 and ExternalInterface. I am currently using a homemade bridge to use RTMFP with Javascript and whenever I try to pass data that contains
Admittedly this wouldn't work directly for output to the console in Firebug, but for most other applications (i.e. sending a potentially 'invalid' string to Javascript), escape
and unescape
should work just fine:
AS3:
var testString:String = "\"\\\"\"";
ExternalInterface.call("showString", escape(testString));
And then in Javascript:
function showString(msg) {
console.log(unescape(msg));
document.getElementById('messagebox').innerHTML = unescape(msg);
}