Communication between http and https using Remoting
From Sephiroth.it - phpwiki
I'm writing this due to a personal experience with Flash remoting.
The problem was: open a gateway connection to a https gateway inside an http page (with a normal http gateway connection already opened)
My solution
Pain :) The real problem was that Flash can easily connect and consume the methods of a class under a SSL connection if the page itself (where is the Flash object) is already under https... but our flash file should not start under https. This means that i was unable to use the https connection while i was under a normal http page. After some minutes of pain and hours of research in google and macromedia forums we begun to try some workaround but nothing worked. The connection using https in remoting should have been worked only if an https page have been already opened in the same browser session... mmmhhh... At this point the idea... we used the local connections and a little javascript :) The steps:
For example we are making a login form in flash that needs flash remoting and uses methods of a class under a https connection. When I press the "Submit" button flash doesn't directly make the remoting invokation but call a javascript which opens a new "hidden" browser window (with an https address) where there is a flash object inside. Once the SSL Panel appears to the user if we click "Yes" the flash object placed in this window makes a local connection calls and tell to the first flash object that now he can proceed with the secure connection. At this point every https connection in flash remoting can be used without problem.
This is just the solution we found. I hope it can be useful for someone else, or if you have a better solution please write it here :)
Question:When the user arrives at the first page (index), can't you simply Redirect him to an https page containing the Flash object???
Re: We could not because of the 'project directives', and also because the https connection is slower and only certain methods must be there.
Question:If you would have loaded a new movie into your old movie with loadMovie("https://mysite.com/newClip.swf) wouldn't you have opened the https connection as well?
Re: Sincerely i haven't thought a this and i didn't try this solution. If you can make a test please tell us the results!

