Thursday, 21 April 2011

how to get the command line arguments of the flex air application


problem
adobe flex4 AS3.0 air
how to get the command line arguments of the air application
---
> dn
solution
You have to listen to invoke event of the air application.
Then, this event gives an InvokeEvent object.
This object has the arguments array, in this arrays are the command line arguments stored... see the follow Listener as example:
   protected function Handler_InvokeEvent(event:InvokeEvent):void
   {
    lb_test.text= event.arguments[0]+' '+ event.arguments[1];
    loadConfigFile();
   }
  

No comments:

Post a Comment