Translate

> | > Open an External Exe File from Flex Builder 3

Open an External Exe File from Flex Builder 3

Posted on Saturday, April 23, 2011 | No Comments

        import flash.desktop.NativeProcess;
        import flash.desktop.NativeProcessStartupInfo;

private function btn_flipbook_click(event:Event):void {

                    if(NativeProcess.isSupported)
                    {
                            var ProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
                            var _FileName:String = "";
                            _FileName = File.applicationDirectory.nativePath + "\\book.exe";
                            var mp:File = new File();
                            mp = mp.resolvePath(_FileName);
                            ProcessStartupInfo.executable = mp;
                            var process:NativeProcess = new NativeProcess();
                            process.start(ProcessStartupInfo);
                    }


    }

if you find any problem to get NativeProcess then you shoud need to update your Air SDK for Flex your Builder  , See this Link : http://littleprograming.blogspot.com/2011/04/installing-adobe-air-2-sdk-in-eclipse.html

Leave a Reply

Powered by Blogger.