I have an AIR application that when I run it from the flex ide with a profile that sets all of the command line arguments I'm expecting to get in the application and it runs fine that way. So I don't think there is anything wrong with my InvokeEvent handler. It get's called and it can read any command line arguments passed to it.
However, when I try to invoke my AIR app from a web browser using the air.swf launchApplication function the arguments I'm passing to it get lost. The AIR application launches. However, the arguments I'm logging the start with are not set. I'm using the simple instructions from this page:
Am I missing something? Can someone share a working example?
You can use BrowserInvokeEvent.BROWSER_INVOKE to capture the data if you are launching the adobe application from your browser.
air.NativeApplication.nativeApplication.addEventListener(air.BrowserInvokeEvent.BROWSR_INV OKE, onInvoke);
var parms = new Array();
if (event.arguments.length >0)
// assuming that your argument is like "arg1 arg2"
parms = event.arguments.split(" ");
Adobe has several bugs in the Air library because I can not pass an array as parameter. I have to convert the array to string with spaces (it does not take | or any other characters).
Adobe Air is buggy but I have no choice to use it for now until some other vendor develop a better solution......