header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
ricky
Points:0
Posts:0

10/10/2012 12:32:59 AM

Title: flash adobe air open exe file error


i am using flash cs6..
i cant open external exe file
and this is my.. code..



import flash.filesystem.*;


var nativeProcessStartupInfo = new NativeProcessStartupInfo(); 
var file = File.applicationDirectory.resolvePath("test.exe"); 
nativeProcessStartupInfo.executable = file; 
var processArgs = new Vector["<String>"](); 
processArgs.push("hello"); 
nativeProcessStartupInfo.arguments = processArgs; 
var process = new NativeProcess(); 
process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData); 
process.start(nativeProcessStartupInfo); 

function onOutputData(event):void 
{ 
    //var stdOut = process.standardOutput; 
   // var data = stdOut.readUTFBytes(process.standardOutput.bytesAvailable); 
    //trace("Got: ", data); 
}




1
Udit
Points: 0
Posts:0
12/8/2012 8:25:31 AM



it cannot work directly , you need to create native executable that will launch the air application and then AIR can tell the Native application to execute any other file. See these links may help you understand this better

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/NativeProcess.html

http://stackoverflow.com/questions/672021/adobe-air-to-execute-program

http://stackoverflow.com/questions/7478322/why-is-air-nativeprocess-not-supported


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+16+4 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions