3 Replies Latest reply on Mar 28, 2008 1:30 PM by DThenar

    parentSandboxBridge and Flex with reference error

    DThenar
      I'm looking in the LiveDocs at http://livedocs.adobe.com/flex/3/html/help.html?content=security_5.html (Developing AIR applications with Flex / Application development essentials / AIR Security / "Scripting between content in different domains"). I see that it is theoretically possible to have an AIR app that calls a remote SWF file or HTML file, but the SWF file example shown is a simple ActionScript-based class. We don't want to use HTML for our server pages or our presentation for a number of reasons, partly because we like the graphical presentation of Flex over DHTML, and because we've fallen in love with the Flex languages of AS3 and MXML. We are not using Flash per se, so we're looking for a way to use Flex modules on the server with an AIR app.

      However, getting that far, I'm getting this error message:
      "1119: Access of possibly undefined property parentSandboxBridge through a reference with static type flash.display:LoaderInfo"

      Below is the server code, out of the examples, that I'm trying to adapt to Flex 3. I'm using Flex 3 build 3.0.190133 Beta 3 Eclipse plugin with Eclipse 3.2.2 build id: M20070212-1330. When I put in the 2nd line, with the parentSandboxBridge, I get the error message. Remove it, the error goes away.

      quote:

      trace("Capabilities.playerType: " + Capabilities.playerType);
      storeRequester = loaderInfo.parentSandboxBridge;

      var tf:TextField = new TextField();
      tf.autoSize = TextFieldAutoSize.LEFT;
      addChild(tf);

      /*tf.appendText("Store price of album is: " + storeRequester.getAlbumPrice());
      tf.appendText("\n");
      tf.appendText("Sale price of album is: " + storeRequester.getSaleAlbumPrice());*/



      I see some examples about how to make AIR apps that are HTML- and AJAX-based that can use the parentSandboxBridge and childSandboxBridge to talk crossframe in the application context. Having the ability to have a local page or frame tied to a remotely-housed page or frame, with certain specific restrictions, gives a lot of power to work with.

      Our model requires that we put as little on our local machines as possible due to distribution issues. We are in a closed network model that we have total control over, so the internet security model is acting as much as a hinderance as anything else. We'd really like to see this work: it could potentially revolutionize the product we are working on.