0 Replies Latest reply on Jan 14, 2011 6:04 AM by capitainequebec

    FileStream problem with AIR deployment


      I use FileStream to load local XML file. When I test the desktop application directly from Flex everything is ok but when I install it with AIR, the application work but the file is not loaded. Here is the code I use:


      import flash.filesystem.*;



      var applicationDirectoryPath:File = File.applicationDirectory;


      var nativePathToApplicationDirectory:String = applicationDirectoryPath.nativePath.toString();


      nativePathToApplicationDirectory +=



      var file:File = new File(nativePathToApplicationDirectory);



      var fs:FileStream = new FileStream();


      fs.open(file, FileMode.READ);



      var config:XML = XML(fs.readUTFBytes(fs.bytesAvailable));




      plan.text = config.division;