1 Reply Latest reply on Apr 7, 2008 1:54 AM by anirudhs

    Local connection for communication between swf and AIR

    srividhi
      I am loading a swf using HTML control. I have a button in the swf. On the click of that button i need to execute a function in air application.Plz suggest me some sample code/tutorials/documentationtion for using local connection to communicate between swf and AIR application.
        • 1. Re: Local connection for communication between swf and AIR
          anirudhs Level 2
          Hi,

          You can use ExternalInterface.call() to call a javascript function from the SWF. This javascript function can then call your AIR function.

          You can get the application object in JS inside the HTML control via: window.runtime.flash.desktop.NativeApplication.nativeApplication.activeWindow.stage.getCh ildAt(0).application

          Once you get that you can call any function in your main MXML file.