applicationResourceDirectory or applicationStorageDirectory

November 6th, 2007 at 10:47am Administrator

Flexets Forum - learn Flex / AIR / Flash / ActionScript

If you're new here, you may want to subscribe to my RSS feed. If you like my site, consider linking back. I prefer text "Free Flash Tutorials" to http://www.franto.com
Thanks for visiting my site! If you need anything just contacting through Contact page

This is small AIR tip: use File.applicationStorageDirectory instead of File.applicationResourceDirectory.

I’ve stuck on this error

SecurityError: fileWriteResource
at runtime::SecurityManager$/checkPrivilegeForCaller()
at flash.filesystem::File/moveToAsync()
at copy_fla::MainTimeline/copy_fla::frame1()
at runtime::ContentPlayer/loadInitialContent()
at runtime::ContentPlayer/playRawContent()
at runtime::ContentPlayer/playContent()
at runtime::AppRunner/run()
at global/runtime::ADLEntry()

After some googling I’ve found this forum post. That’s quite interesting. This is answer from Kevin Hoyt:
“As part of the additional security features added to AIR Beta 2, applications are no longer permitted to write to the application resource directory. It is recommended that you use applicationStorageDirectory.”

I’m just curious if applicationResourceDirectory is there just for backward compability of there is some other reason like you know, where is you application installed.

AddThis Feed Button

Entry Filed under: , , ,


Do you want to receive fresh news from my site?
Subscribe to my RSS

»Related posts:

  • No related posts


4 Responses to “applicationResourceDirectory or applicationStorageDirectory”

  1. 1
    davidderaedt Says:

    Hi there ;)

    The thing is that you still can read from this directory. So, one case you could use it for would be to embed content during the AIR application install process, and then copy it to the storage directory.

    More about this here.

  2. 2
    DEL Says:

    var objFile:File = new File(”file:///” + File.applicationDirectory.resolvePath(strFilePath).nativePath);

    the output would be like this…
    file:///c:\del\userConf.xml

    This will work fine.

    Although this is wrong but what about those who want to edit installed files. Also this will not work if the user is not an administrator.

  3. 3
    Tom Says:

    HAAA you CANT write on applicationDirectory on Vista! And moreover, application stop and wait wait wait….

    But however you can write on DocumentDirectory, but AIR sould not be cross OS????

  4. 4
    horneygamer com Says:

    [...] Flash here. Find beautiful wallpapers or facebook cheats here. Provide Flash products advertising…http://www.franto.com/blog2/applicationresourcedirectory-or-applicationstoragedirectoryHorny Toad Activewear ~ Inspired Outdoor ClothingOur official site, and the only place you can find [...]

Leave a Reply