0 Replies Latest reply on Jan 30, 2008 2:37 PM by happedig

    URGENT!: Flash and Vista -- writing to files

      Hi -
      I have a SWF that is being delivered with a separate application via CD. When the application opens the first time, it queries the OS for the locale (since Flash can't do that anymore), and writes a text file that reads: Country=xxx (where xxx is the name of the country). My SWF loads that text file in and uses the variable to display the pieces of the animation that pertain to the user's country.

      The SWF is in \help\flash. The text file is in \help\xmlmenu. The ActionScript uses a relative path to load the text file. This works great in Windows XP. But in Vista, because these files are all in the "Program Files" directory, the application doesn't have admin privileges, so it can't write to the text file.

      I was thinking about hard-coding the path to the Application Data folder, but since Vista could be installed on C: or D:, that won't work. Is there a way to query what the Windows installation drive is? Or can Flash query for registry entries?

      I'm using Flash 8, AS 2.0.

      Any other ideas? I'm desperate here -- the software's supposed to release in 2 weeks!