navigateToURL with GET parameters in local SWF
- by Michael Brewer-Davis
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 seems to be ignoring the parameters when opening the local page, though.
I've been scouring the Flash security pages to find a documented prohibition for this, but haven't found anything. Pointers?
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>