Loading a file in flex prompt for error called Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type. What i need to do is when this error occurs i want to call a function. So i put the block of code causing an error occurrence in try catch block. But when error occurred it does not come in catch. Below is snippet of code.
try {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderCompleteHandler);
loader.loadBytes(fileReferance.data);
}
catch(err:*) {
functionTocall(fileReferance);
}
How to handle it..