I have an Adobe Air application(based in flash) that loads in PNG files from a directory, there is a text file to specify the path, however it doesn't seem to be working on OSX while it works just fine on Windows
Windows path
C:\Users\User\Documents\Trees
This works just fine, however mac path
file:///Users/user/Desktop/trees/
or
Users/user/Desktop/trees/
Doesnt work, tried to reverse the slashed, didn't help either, anyone could help?
Update, heres the function that laods in the trees
private function LoadTrees():void
{
try
{
Trees = new Array();
var currentDirectory:File = new File(currentPath);
var files:Array = currentDirectory.getDirectoryListing();
for (var i:int = 0; i < files.length; i++)
{
var fullFilePath:String = treePathLoader.data + "\\" + files[i].name;
var tree:Tree;
if (fullFilePath.indexOf(".png") > 0)
{
tree = new Tree(fullFilePath, treePositions.Tree[i].x, treePositions.Tree[i].y,treePositions.Tree[i].scale);
Trees.push(tree);
}
}
}
catch(e:Error)
{
trace("ERROR");
}
}