0

I'm running a website from a USB drive and trying to pass parameters through the address bar to a new window when a button is clicked in the embedded flash swf.

The problem is that on some workstations the parameters are stripped from the URL. On others it works fine.

I have a movieclip button that when clicked calls this function:

function onReleaseHandler(myEvent:MouseEvent) {     
    var printURL = "html/certPopup.html";
    var request:URLRequest = new URLRequest(printURL);
    var variables:URLVariables = new URLVariables();
    variables.vModTitle = modTitle;
    variables.vFirstName = firstName;
    variables.vLastName = lastName;
    variables.vLang = language;
    request.data = variables;
    navigateToURL(request, "_self");
}

On machines where this is working, the certPopup.html page opens in a new tab and the URL in the address bar looks like this:

file:///G:/courses/flash/1/EN/course/html/certPopup.html?vFirstName=Charlie&vModTitle=This%20is%20the%20Title&vLang=EN&vLastName=Brown

On workstations where this is not working the URL in the address bar appears as:

G:\courses\flash\1\EN\course\html\certPopup.html

Browser is IE version 10.0.9200.16540 on all workstations.
Flash version is WIN 11,6,602,180 or higher.

I'm really stumped as to why the URL in the address bar is different on different machines, with the parameters being stripped.

1 Answers1

0

The reason the first works and second doesn't is, that the first one is a URL, the second one is a file path. I have no idea if this might work, but try changing

var printURL = "html/certPopup.html";

to

var printURL = root.loaderInfo.loaderURL.replace(root.loaderInfo.loaderURL.split("/").pop(), ""); + "html/certPopup.html";

But since you are working on an offline project: Why don“t you work with AIR with captive runtime? Would be easier and the possibilities would be much greater?

codingbuddha
  • 707
  • 5
  • 16