11 Replies Latest reply on Jan 19, 2009 9:29 PM by rahimhaji

    Writing in to a Text file in Vista 32 OS

    rahimhaji Level 1
      Dear Friends,

      I have developed a standalone ticker in Adobe AIR, in that iam storing setting options in a local text file. It is working fine in XP.

      but when i install my application(ticker) in Vista32 OS, when i do changes in my setting file, i have to write the changes in local text file. it is not writing the modified setting text in the text file. my coding is:

      function writefile() {

      tempscr1=3;

      var finalstr2:String = "smallwinmode="+smscr+"&speed="+setmc.tickeropt.sld.s.value+"&alert="+altval+"&maxi="+max ifeed+"&alwtop="+setmc.tickeropt.aifch.selected+"&prescr="+tempscr1+"&prescrx="+newwindow3 .x+"&prescry="+newwindow3.y+"&firstinstal="+fins;
      var dskTopFileStream2:FileStream = new FileStream();
      var dskTopFile2:File = File.applicationDirectory;
      var fileString2:String = (dskTopFile2.nativePath + "\\settings.txt");

      dskTopFile2 = dskTopFile2.resolvePath(fileString2);

      dskTopFileStream2.openAsync(dskTopFile2, FileMode.WRITE);
      dskTopFileStream2.writeUTFBytes(finalstr2);
      dskTopFileStream2.close();
      }

      Anybody can help me. if it works in Vista also i can release my product, i got struct up... kindly tell me should i change my coding to write txt file in Visa? pls help me....


      Thanks in advance,
      Syed Abdul Rahim