hi, i’m trying to make this sample i got from internet on pc but doesn’t work and even report any trouble…it works fine in mac, i just changed the path…anyone could throw me some light? i export an air executable to make native process work:
import flash.events.NativeProcessExitEvent;
import com.demonsters.debugger.MonsterDebugger;
MonsterDebugger.initialize(this);
function executeNativeProcess():void
{
var executable:File = new File("/Program Files (x86)/HotVirtualKeyboard/hvk.exe");
var nativeProcess:NativeProcess = new NativeProcess();
if (NativeProcess.isSupported)
{
trace("Native Process Supported");
}
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = executable;
var args:Vector.<String> = new Vector.<String>();
args.push("hide");
//open file that was given with the executable application
nativeProcessStartupInfo.arguments = args;
nativeProcess.addEventListener(NativeProcessExitEvent.EXIT, onExitError );
try {
nativeProcess.start(nativeProcessStartupInfo);
} catch (error:IllegalOperationError) {
trace("Illegal Operation: "+error.toString());
} catch (error:ArgumentError) {
trace("Argument Error: "+error.toString());
} catch (error:Error) {
trace ("Error: "+error.toString());
}
if (nativeProcess.running)
{
trace ("Native Process Support");
}
}
function onExitError(event:NativeProcessExitEvent):void
{
trace( "Native Process Exit code: "+event.exitCode);
}
aparece.addEventListener(MouseEvent.CLICK, executeNativeProcess);
aparece.buttonMode = true;
thanks a lot in advance.