Call from AS3 to JS in a XULrunner application
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Is it possible to use the AS3 externalInterface to communicate with the JS in a xulrunner application? The same code works in a browser but doesn't work in the xulrunner environnment: the js function is not called. Is there something special to do?
simple sample code :
xul file:
<script type="application/javascript">
function testExternalCall()
{
alert("Call from AS3 succeeded!");
}
</script>
AS3:
m_external_call_test_button.addEventListener(MouseEvent.CLICK,callAS3toJS);
function callAS3toJS(e:MouseEvent):void
{
ExternalInterface.call("testExternalCall");
}
Thanks in advance
Regards,