I am using as3 air and testing on an android.
I need to able to load, thru a browse feature, the sd card
OR
I need to point directly to that file folder thru a path.
I have successfully downloaded a zip file from a server. I can unzip it while testing on
my desktop because I can browse to the correct path on desktop but not on phone. But I don’t need the browse feature anyway, right now. I just need to be able to point to the applicationStorgeDirectory and the file in there. 🙂
I need the file var 🙂
var reader:ZipFileReader = new ZipFileReader();
reader.open(file); /// Help :)
UPDATE Sept 4th 2012 5pm
I tried this code:
var file:File = File.applicationStorageDirectory.resolvePath("myFile.zip");
trace(file.url); //path to the file
//assuming that function takes a string path
reader.open(file.url);
and I got this error:
Scene 1, Layer 'Layer 1', Frame 1, Line 46
1067: Implicit coercion of a value of type String
to an unrelated type flash.filesystem:File.
This should give you a url to an existing file
File url
You could try something like this: