Domanda

Could anyone say how to restart it?

I found this sample and try to adapt it for me:

            var appLauncher:File;
                appLauncher = new File(File.applicationDirectory.nativePath).parent.parent.resolvePath("Contents").resolvePath("MacOS").resolvePath("FlashApp");

            var npInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo;
            npInfo.executable = appLauncher;
            var _args:Vector.<String> = new Vector.<String>;
            npInfo.arguments = _args;
            var np:NativeProcess = new NativeProcess;
            np.start(npInfo);
            np.exit();

But I don't understand how it should work.. Now nothing happends when this function called frome one of my classes.

È stato utile?

Soluzione

Did you try it with ADL? Or with actually packaged/installed app?

It is related its package structure. If you try with ADL, it may not work.

Also,

  • "FlashApp" must be changed to the name of your application,
  • The last line should be exit(); of your NativeApplication, not np.exit()
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top