I organized a spell-checker with help Squiggly in my app ( http://labs.adobe.com/technologies/squiggly/).
_newdict.addEventListener(Event.COMPLETE, handleLoadComplete);
_newdict.load("dictionaries/en_EN/en_EN.aff", "dictionaries/en_EN/en_EN.dic");
Everything works fine when the dictionary files is in the same folder as the app. But the dictionary have large size (over 5MB). Therefore load it on user demand. Files can not save the program folder, but only application Storage Directory.
However, when initializing the dictionary there is an error: null cannot be parsed to a squiggly dictionary. I've tried both ways: file1.nativePath and file1.url, it is still the error.
var file1:File = File.applicationStorageDirectory.resolvePath("dictionaries/en_EN/en_EN.aff");
var file2:File = File.applicationStorageDirectory.resolvePath("dictionaries/en_EN/en_EN.dic");
if (!file1.exists || !file2.exists){
//download files from the server
} else {
_newdict.addEventListener(Event.COMPLETE, handleLoadComplete);
_newdict.load(file1.nativePath,file2.nativePath);
//_newdict.load(file1.url,file2.url);
}
Tell me how to solve the issue, please?
North America
Europe, Middle East and Africa
Asia Pacific