Try adding file:// to the front of your path: file:///User/Images/icon.png
1 person found this helpful
To further expand on Zak's response:
The reason it was not working was that you need to provide a valid url for a File object.
For more details on the format of urls and nativePaths pertaining to local files, take a look at the AIR File documentation:
Thanks zak for your reply!!