Am coding an AIR 1.5 app in which I want to do a remote load of a Flex .swf file from a web server.
I'm using Flex 3.2 SDK and attempting to use the sub-application feature via SWFLoader. I've been referencing the Developing and loading sub-applications document on how to do this.
I can indeed successfully load the Flex .swf file from a remote web server and it is loaded into a remote sandbox. The running forms of this .swf file even respect the transparency setting I've set on the AIR native window.
Here is the rub:
For a production situation, our web server uses Spring Security to deflect any unauthorized access to a login web page (this is the case for normal development/QA build deployments as well). If a successful login has been done, then the response of the login sets a cookie. This cookie header should be present on all subsequent HTTP interactions that seek to retrieve content from the site.
I can't figure out how to set a cookie header on my uses of SWFLoader to retrieve Flex .swf files.
How can I use SWFLoader to retrieve files from a web site that is being guarded with Spring Security (which is a widely used means of securing access to Java-based web sites - it used to be called Acegi security before melding with Spring Source).
Running our Flex-based code was a snap when running it in a browser Flash Player sandbox - the Spring Security stuff was managed just swell by the browser. Trying to run our Flex-based app in AIR as a sub-application within the safe confines of a remote sandbox is proving to be a hellish experience, though.
The AIR HTML control, though it works with Spring Security well enough, is a no-go because any .swf or .pdf content loaded will not show up if transparency is set to true on the AIR native window. Our particular UI design absolutely mandates transparency be set to true as we're doing MDI child windows that float on the user desktop.