I am writing a simple HTTP server that returns a default Index.swf file in a standard HTTP response packet w/ "content-type: application/x-shockwave-flash" the followed by the .swf file binary. Everything is working fine. However, if I want to also pass in some server side parameter (e.g. IP address of the servering server) to the Flex application when it runs in client's browser,then I hit the brick wall...
On the flex side, I put the following AS code:
var serverUrl:String = Application.application.parameters.serverURL;
So far I tried and failed all the following methods in the HTTP response header:
Nothing works. Has any guru out there knows about the trick to do that.
Thanks in adavnce,
Not sure. Can you send an HTML wrapper with the flashvars for the SWF?
OK, since I AM the server, I guess I can generate a HTML page. But I am new to "flashvars" for the SWF. So, is there any example HTML page w/ "flashvars"?
Also, how is this HTML way different from directly fetching paramter from HTTP packet? Can Flex app directly access the HTTP packet from which it loaded?