Question

This is kinda silly but I can't seem to find the directory path for the included folder. In Flash Cs6 publish setting, I included a folder which is located at c:\abc\def\ghi/xxx.

In this case, the path in iOS will be app://xxx? To access a flle in the folder, what string do I exactly need to pass to the URLRequest?

Was it helpful?

Solution

I think you are trying to access applicationDirectory. In iOS standard directories native path like

app:/ means applicationDirectory

applicationDirectory - /var/mobile/Applications/uid/filename.app

applicationStorageDirectory - /var/mobile/Applications/uid/Library/Application Support/applicationID/Local Store

However you can access application directory file like

var applicationXMLFile:File =  File.applicationDirectory.resolvePath("application_data.xml");
var applicationXMLUpdateFile:File = new File(applicationXMLFile.nativePath);

if we are trying access directly like

var applicationXMLFile:File =  File.applicationDirectory.resolvePath("application_data.xml");

Sometimes it throws SecurityError/IOError.

http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7d9e

OTHER TIPS

Using a File.

If you want pass to URLRequest iOS Documents folder path.

try this:

var urlRequest:URLRequest = new URLRequest(File.documentsDirectory.resolvePath("myFile.txt").nativePath);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top