2 Replies Latest reply on Jul 20, 2008 10:34 PM by rahimhaji

    createRootWindow

    rahimhaji Level 1
      Hi friends,
      I have created an air application which will load another swf (settings.swf) with html page using createRootWindow. In my settings.swf iam reading a text file and updating the data at text file on my local computer. when i run the air file it is working fine. if i load the same swf in another air application through a html loader (createRootWindw), it is not writing in my local txt file. may be the recurity reason. it is not woring. i got sturck up pls help me.

      please be informed that i tried with allowdomain("*") - it is giving error.

      i tired with locally_trusted that too no use.

      pls help me...

      Thanks in advance,

      rahimhaji
        • 1. Re: createRootWindow
          Admiral_Brodnack
          Only content loaded into the application sandbox has access to the AIR APIs such as those for writing files. I'm not sure exactly what it is you are trying to achieve, but the mechanism provided in AIR for insecure content to communicate with application content is the sandbox bridge. A sandbox bridge is essentially an interface between your application and content loaded from an arbitrary location.

          See http://livedocs.adobe.com/air/1/devappshtml/ProgrammingHTMLAndJavaScript_01.html for more information.

          Of course, if you can include the SWF as part of your application instead of loading from somewhere else, it is easier and more secure to do so.
          • 2. Re: createRootWindow
            rahimhaji Level 1
            Dear Mr.Admiral Brodnack,

            Greetings!

            i gone through the sandbox document and created an air application. In that i loaded a swf through HTML (root window). in that swf iam opeing a txt file with write mode and modifiying(updating) the content (data). if i run the fla it is working, but in loading on HTML it is not working.

            can u please tell me the steps to create the security sandbox? i tried.. i got struck up where to include in html or fla? if u tell me step by step will be useful for me..

            thanks and Regars,
            Rahimhaji