Copy link to clipboard
Copied
I am trying to open a local HTML file in the default browser from AIR, while passing parameters.
var source:File = File.documentsDirectory;
source = source.resolvePath("test.html");
var url:String = source.url+"?";
var urlVars:URLVariables = new URLVariables();
urlVars.var1="One";
urlVars.var2= "Two";
var request:URLRequest = new URLRequest(url);
request.data = urlVars;
navigateToURL(request);
This works fine in debugger. It opens the default browser and the url contains the parameters.
However, when the app is published and installed, the page opens in the default browser But With No Parameters.
Some security setting no doubt.
Any help appreciated.
Copy link to clipboard
Copied
Hi,
i´m having the same issue. Did you ever find a solution for this?
I am trying for hours, using both navigateToURL and ExternalInterface.call - works fine for html + swf, but not when published as an exe.
To clarify - this:
ExternalInterface.call("window.open", url + "#data=someData", "_blank");
or this
navigateToURL(new URLRequest(url + "#data=someData", "_blank");
works fine when published as SWF, but only open the url without parameters when published as air exe.
Any Help?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now