Is it me or is file.url a lot easier to use than file.nativePath
in Adobe AIR. Maybe I’m missing something because every tutorial or code snippet I can find uses file.nativePath
.
I’m busy building an AIR application that can be used on Windows and Mac OS. I have to take care of the file structure of both systems. After I test my application on a Mac I couldn’t load anything from it. The reason of this problem is that Mac needs “file://” in front of the file URL to load the file correct.
When I had this problem I searched the internet for a solution. I found very complex solutions at EverythingFlex and Snipplr. But then I start to examine the File object and found just the right file url (on the Mac it adds “file://” in front of the url) just accessible with File.url
. Then I tested it on Windows and it worked perfect.
I see no reason why I shouldn’t use this simple version of all the long code solutions that are available on the web. But like I said maybe I’m missing something?
Leave a Reply to Quentin Cancel reply