I'm running a Flex application locally (local-with-filesystem
or local-trusted
), and I'm trying to call navigateToURL to a local page using GET parameters. Flash Player in Internet Explorer seems to be ignoring the parameters when opening the local page, though.
The same code works as I expect in Firefox, so I'm not sure whether it's an intentional security constraint or no (and if so, Flash's contraint or IE's?).
How would you work around this issue?
My Flex app:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function onClick(event:MouseEvent):void {
var request:URLRequest = new URLRequest("target.html");
request.data = new URLVariables();
request.data.text = "stackoverflow.com";
navigateToURL(request);
}
]]>
</mx:Script>
<mx:Button label="Go" click="onClick(event)" />
</mx:Application>
And my target.html:
<html>
<head>
<script language="JavaScript">
<!--
function showURL() {
alert(window.location.href);
}
//-->
</script>
</head>
<body onload="showURL()" />
</html>