Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Open local html file with parameters in default browser

Explorer ,
Jun 27, 2016 Jun 27, 2016

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.

TOPICS
ActionScript
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 07, 2017 Jun 07, 2017
LATEST

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines