3 Replies Latest reply on Mar 31, 2011 6:34 AM by mick.powell

    Air 2.0 Native process not working

    l33tian Level 1

      Hi Guys

      I'm trying to write an AIR pplication that responds to a Generic Game controller. I used java's Jinput to poll the controllers buttons then send the output to the standard output stream. then i bundled the jar files and the appliccation assets into a .exe file...which works just fine

       

      after doing all the normal native process rituals - instantiating nativeprocessstartupinfo and native process class, setting the executable path, adding eventlisteners for the native process and calling the start method, it doesnt seeem to give me any ouput

       

      Here is snipppet my code

       

       

      if(NativeProcess.isSupported)

      {

           Alert.show("native process is supported!")

           // TODO Auto-generated method stub

           var flApp:File=new File("FLController/FansleagueController.exe")

       

           inputProcess=new NativeProcess();

           inputProcessInfo=new NativeProcessStartupInfo();

           inputProcessInfo.executable = flApp;

           inputProcessInfo.workingDirectory=File.applicationDirectory;

       

      if(flApp.exists)

      {

           Alert.show("Controller Mediator Application(fansleagueController.exe) Found!");

      }

      else

      {

           Alert.show("Controller Mediator Application(fansleagueController.exe) could not start!");

      }

       

           inputProcess.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);

           inputProcess.start(inputProcessInfo);

      }

      else

      {

           Alert.show("Native process is not supported in this environment, make sure the extendedDesktop *** was selected in the Application descriptor");

      }