3 Replies Latest reply on Aug 19, 2009 10:10 AM by seaneyefi

    parentSandboxBridge with remote URL.


      Hi all,


      I was reading up on the security sandboxing model in AIR here and I was wondering whether the following was possible.


      1. I have a HTML based Ajax application which needs to open up a URL on a remote server. For the sake of argument, lets say this is http://www.eye.fi/auth.php.


      2. http://www.eye.fi/auth.php has a JavaScript function defined called returnToApp which is invoked when the user interacts with http://www.eye.fi/auth.php


      3. When returnToApp is invoked, I need to execute functionality in my AIR app. So, I basically need to set some kind of listener in my AIR app which listens for the returnToApp in auth.php to be invoked.


      In my AIR application, I'm opening up http://www.eye.fi/auth.php using the air.HTMLLoader.createRootWindow method, but the examples in the security sandboxing documentation usually have the 'parentSandboxBridge' attached to an iframe. I guess I have a couple of questions:


      1. Is it possible to attach a bridge between an AIR application and a remote URL?


      2. If so, is it possible to listen for a particular method in the remote page to get invoked and pass information from the remote page back to the AIR application.


      If this is not possible, or you'd suggest me take a different route, I'd be very interested to hear your opinions.