This content has been marked as final. Show 6 replies
Okay, I think I figured it out. You don't use File.download() at all, you download the file using URLLoader as binary data then write it to a File.
var r = new URLRequest(" http://abeall.com/files/flash/Fly.swf")
var u:URLLoader = new URLLoader();
u.dataFormat = "binary";
var file:File = File.desktopDirectory.resolvePath("downloadedFile.swf")
var fileStream:FileStream = new FileStream();
Im getting a security error when trying the above snippet...
I can get the files down into the temp directory, but when i try to save them (or move them after creation in temp)..to the application folder, (where i need them)..it throws an error.
Any ideas? .. am i missing something to allow air to write to the application folder?
Any help you can give is hugely appreciated.
You are not allowed to store the file to the application folder.
You need to store the file somewhere else.
Ive since last night worked that out...just found it odd that some code examples i found online for this, showed writing to the application folder ... ??
After reading the security docs it makes sense...ive modified the app architecture to work with the storage directory so all is good...
cheers for reply though
It was allowed to do that before 1.0. Not anymore.
Use this instead to write to a 'user allowed' area...