waithome 2016-02-17 08:50 采纳率: 100%
浏览 1578
已采纳

flash air NativeProcess 相关问题

先附上源码
import flash.desktop.NativeApplication;
import flash.desktop.NativeProcess;
import flash.desktop.NativeProcessStartupInfo;
import flash.filesystem.File;
import flash.events.MouseEvent;

var process:NativeProcess = new NativeProcess;
NativeApplication.nativeApplication.autoExit = true;

var file:File = new File;
file = file.resolvePath("C:/Windows/System32/cmd.exe");

var processArg:Vector. = new Vector.();
processArg.push("/c");
processArg.push("start C:/Windows/System32/osk.exe");

var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo();
npsi.executable = file;
npsi.arguments = processArg;

stop();

stage.addEventListener(MouseEvent.CLICK, click_handler );

function click_handler( e : MouseEvent ) : void
{
if( process.running )
{
return;
}

process.start(npsi);

}

这段源码在flash编译器里调试运行的时候没有任何问题,点击舞台可以弹出系统软键盘,但是很奇怪的是我发不成exe安装包后,点击安装,然后运行程序,点击应用就调不出软键盘了; Air 3.2,配置文件中 desktop extendedDesktop已添加

  • 写回答

1条回答

报告相同问题?

悬赏问题

  • ¥15 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题