How to Handle\catch this error
Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.
I try to load a corrupted image in to MovieClip with AS3
I tried to use try & catch but no way
I alse try to addEventListener
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
but it doesn’t catch this error
Any Help?!
If you want to catch any unseen errors, you can use a standard try-catch block.
This catches errors, like the swf you are trying to load is an old swf (published with AS2) – Error #2180.
If the file can’t be found, or doesn’t look like to be of any of the loadable formats, then the ioError part runs – Error #2124.