1 Reply Latest reply on Jul 19, 2008 4:00 AM by anemitoff12

    How do I debug a browser invocation problem?

    anemitoff12 Level 1
      I am trying to use airSWF.launchApplication(appID, pubID) to launch my app from the browser and although there seems to be some disk activity when triggered, my AIR application never appears.

      airSWF.getApplicationVersion() DOES work perfectly telling me that I have the correct appID and pubID.
      I have double checked that 'allowBrowserInvocation = true' in my .xml file.
      I have also made sure that launchApplication is triggered via a user click.

      How do I debug this problem?
        • 1. Re: How do I debug a browser invocation problem?
          anemitoff12 Level 1
          I discovered that REAL problem is that I am trying to trigger the air application launch from an HTML element "onClick" event. When I added a button to my airCommunicator.swf (which loads air.swf) with a click event handler that calls the same exact launch code, I was able to click the button in the SWF on the web page and launch my app.

          BUT I really need to launch my app from a click on an HTML element. Please HELP.

          I have javascript in my HTML that looks like:
          function launch() { airCommunicator.launch(); }

          I have an element in my HTML that looks like:
          <a href='javascript:launch();'>click me</a>

          And I have my airCommunicator.fla that looks like:
          function launch() {airSWF.launchApplication(appID, pubID);}
          ExternalInterface.addCallback("launch", launch);
          myButton.addEventListener('click',launch);