0 Replies Latest reply on Dec 14, 2009 10:09 AM by kenleafay

    index.html not in App' Sandbox?!

    kenleafay

      Hi,

      I am still getting by head around AIR. I just figured out the syntax. I am trying to write a .txt file to the documentsDir... I get this error:

       

      Error #3205: Only application-sandbox content can access this feature.

       

      here is my code:


      1.             function writeLocalFile(content1){

      2.                 alert('File Saved. ' + content1);

      3.                 var name = "AirTest" + ".txt"

      4.                 var toFile = air.File.applicationDirectory.resolvePath("MyDir/Test.txt");

      5.                 var stream = new air.FileStream();

      6.                 stream.open(toFile, air.FileMode.WRITE);

      7.                 stream.writeUTFBytes(content1);

      8.                 stream.close();               

      9.           

      10.             }