Actionscript 3 AIR 3.2桌面不支持NativeProcess?

Actionscript 3 AIR 3.2桌面不支持NativeProcess?,actionscript-3,flash,apache-flex,air,Actionscript 3,Flash,Apache Flex,Air,我正在创建一个捕获桌面截图的应用程序。 当我在Flash上编译和运行应用程序时,只有当我使用AIR3.2桌面发布应用程序时,它才能正常工作。它将不支持NativeProcess。 我正在Mac机器上运行应用程序 以下是我正在使用的代码: if (NativeProcess.isSupported) { var file:File = File.desktopDirectory; if (Capabilities.os

我正在创建一个捕获桌面截图的应用程序。 当我在Flash上编译和运行应用程序时,只有当我使用AIR3.2桌面发布应用程序时,它才能正常工作。它将不支持NativeProcess。 我正在Mac机器上运行应用程序

以下是我正在使用的代码:

        if (NativeProcess.isSupported)
        {
            var file:File = File.desktopDirectory;
            if (Capabilities.os.toLowerCase().indexOf("win") > -1)
            {
                file = file.resolvePath("bin/");
            }
            else if (Capabilities.os.toLowerCase().indexOf("mac") > -1)
            {
                file = file.resolvePath("/usr/sbin/screencapture/");
                trace(" in "+file.nativePath);
                status.text = file.nativePath;
            }
            var str = "screencapture" + String(count) + ".png";
            trace(" String "+str);
            var args:Vector.<String> = new Vector.<String>();
            args[0] = str;
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
            nativeProcessStartupInfo.arguments = args;
            nativeProcessStartupInfo.executable = file;
            nativeProcessStartupInfo.workingDirectory = File.desktopDirectory;

            process = new NativeProcess();
            process.start(nativeProcessStartupInfo);

        }
        else
        {
            trace("Native Process not supported");
            status.text = " Native Process not supported";
        }
if(NativeProcess.isSupported)
{
var file:file=file.desktopDirectory;
if(Capabilities.os.toLowerCase().indexOf(“win”)>-1)
{
file=file.resolvePath(“bin/”);
}
else if(Capabilities.os.toLowerCase().indexOf(“mac”)>-1)
{
file=file.resolvePath(“/usr/sbin/screencapture/”);
跟踪(“在”+file.nativePath中);
status.text=file.nativePath;
}
var str=“屏幕捕获”+字符串(计数)+“.png”;
跟踪(“字符串”+str);
变量args:Vector.=新向量。();
args[0]=str;
var nativeProcessStartupInfo:nativeProcessStartupInfo=new nativeProcessStartupInfo();
nativeProcessStartupInfo.arguments=args;
nativeProcessStartupInfo.executable=文件;
nativeProcessStartupInfo.workingDirectory=File.desktopDirectory;
进程=新的NativeProcess();
进程启动(nativeProcessStartupInfo);
}
其他的
{
跟踪(“不支持本机进程”);
status.text=“不支持本机进程”;
}

非常感谢您提供的任何帮助

您是否使用extendedDesktop配置文件?是的,我使用了extendedDesktop配置文件,但仍然面临这个问题。你试过了吗?或者这在这里不合适?