0

I have an application prepared in Action Script 3. There is a part related to requesting a file from application storage directory. However when I use following codes (xmlLoader part), program looks into app directory.

How can I make it look into application storage directory or may any other code alternatives be used for this request? Thanks.

var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest(Puzzleoriginalpath + ".xml"));
M. Ö.
  • 61
  • 4
  • 12

1 Answers1

2

You can get the storage directory through

 File.applicationStorageDirectory.nativePath

Then build your path:

 File.applicationStorageDirectory.nativePath + "/examplepuzzle.xml"
Kodiak
  • 5,978
  • 17
  • 35
  • Definately! I didn't think that appstorage directory and file path can be added with plus :/ Thank you! – M. Ö. May 03 '13 at 12:01
  • You can use `resolvePath` like `var file:File = File.applicationStorageDirectory.resolvePath("examplepuzzle.xml");` check https://stackoverflow.com/questions/7858670/save-image-in-a-directory-in-applicationstoragedirectory – Nande Jul 13 '17 at 19:34