Reputation: 430
i have an exe file of a game made in construct2 tool..i am trying to run it from my as3 code using url requset..but my code is not working what should i do? here is my code..
btn1.addEventListener(MouseEvent.CLICK, f_testURLOpener);
function f_testURLOpener(event:MouseEvent):void
{
var url:String = "UserGuide/carrace(banjonborno).exe";
var request:URLRequest=new URLRequest(url);
navigateToURL(request);
}
when i click btn 1 to run the game it is showing the programm's publisher could not be verified.. are construct 2 made exe files not runnable from as3?
Upvotes: 1
Views: 416
Reputation: 2359
Considering that you have a Desktop application using Adobe AIR, not a Flash Player based application running on browser.
You can try the method openWithDefaultApplication
var file:File = File.applicationStorageDirectory.resolvePath('UserGuide/carrace(banjonborno).exe');
trace('file?', file.exists);
if (file.exists) file.openWithDefaultApplication();
Upvotes: 1
Reputation: 4340
You cannot run .exe in Web apps (flash/Actionscript)
You could use Adobe Air desktop app to run a process on the local machine http://help.adobe.com/en_US/air/html/dev/WSb2ba3b1aad8a27b060d22f991220f00ad8a-8000.html
Upvotes: 1