.
-, , ExternalInterface , ExternalInterface .
public function initApp():void {
if (ExternalInterface.available) {
ExternalInterface.addCallback("foobar", foobar);
}
}
timout, , , Externalinterface .
"foobar" javascript-. , , , "foobar", , .
function testAPICallbackFromGWT(callback){
$clinit_26();
alert('callback to be launched 3 2 1');
callback();
}
, .
ExternalInterface.call("alert", "hello out there");
// establish the call from flash
ExternalInterface.addCallback("hello_out_there", foobar);
// and in javascript
alert(typeof('hello_out_there')); // will be 'function' if exists or undefined if ExternalInterface did not work
, .
, - javascript , . , , , , .
, JavaScript.
Firefox Internet Explorer, , IE - .
Firefox .
.